mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
* Fix #18198 Fix wrong movement with tilt if additional endstop defined * simplify
This commit is contained in:
parent
09255d6373
commit
d0f4637611
@ -1274,8 +1274,8 @@ void CmndShutterPosition(void)
|
||||
(abs(Shutter[index].target_position - Shutter[index].real_position ) > Shutter[index].min_realPositionChange ||
|
||||
abs(Shutter[index].tilt_target_pos - Shutter[index].tilt_real_pos ) > Shutter[index].min_TiltChange) ) {
|
||||
if (Settings->shutter_options[index] & 4) {
|
||||
if (0 == target_pos_percent) Shutter[index].target_position -= 1 * RESOLUTION * STEPS_PER_SECOND;
|
||||
if (100 == target_pos_percent) Shutter[index].target_position += 1 * RESOLUTION * STEPS_PER_SECOND;
|
||||
if (0 == target_pos_percent && Shutter[index].real_position > 0) Shutter[index].target_position -= 1 * RESOLUTION * STEPS_PER_SECOND;
|
||||
if (100 == target_pos_percent && Shutter[index].real_position < Shutter[index].open_max) Shutter[index].target_position += 1 * RESOLUTION * STEPS_PER_SECOND;
|
||||
}
|
||||
int8_t new_shutterdirection;
|
||||
if (abs(Shutter[index].target_position - Shutter[index].real_position ) > Shutter[index].min_realPositionChange) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user