mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-25 07:17:16 +00:00
Merge pull request #13064 from stefanbode/patch-12
shutter: fixed stepper wrong position #12849 follow up
This commit is contained in:
commit
1e0c61091e
@ -1084,7 +1084,7 @@ void CmndShutterPosition(void)
|
|||||||
}
|
}
|
||||||
int8_t new_shutterdirection = Shutter[index].real_position < Shutter[index].target_position ? 1 : -1;
|
int8_t new_shutterdirection = Shutter[index].real_position < Shutter[index].target_position ? 1 : -1;
|
||||||
if (Shutter[index].direction == -new_shutterdirection) {
|
if (Shutter[index].direction == -new_shutterdirection) {
|
||||||
Shutter[index].start_position = Shutter[index].target_position;
|
Shutter[index].target_position = Shutter[index].start_position;
|
||||||
ShutterPowerOff(index);
|
ShutterPowerOff(index);
|
||||||
}
|
}
|
||||||
if (Shutter[index].direction != new_shutterdirection) {
|
if (Shutter[index].direction != new_shutterdirection) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user