mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 12:46:34 +00:00
Update xdrv_27_shutter.ino
Fixing WDT reset on shutters with stepper motors during deceleration #12849
This commit is contained in:
parent
7de0257d1b
commit
3f81f939db
@ -1084,6 +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;
|
||||||
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