From 53ac07baa95821999f2a4b510c9d7f46362e6793 Mon Sep 17 00:00:00 2001 From: stefanbode Date: Sun, 5 Sep 2021 12:24:54 +0200 Subject: [PATCH] shutter: fixed stepper wrong position #12849 follow up Position was wrongly calculated on emergency stop --- tasmota/xdrv_27_shutter.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xdrv_27_shutter.ino b/tasmota/xdrv_27_shutter.ino index f5614d276..3431cb7d8 100644 --- a/tasmota/xdrv_27_shutter.ino +++ b/tasmota/xdrv_27_shutter.ino @@ -1084,7 +1084,7 @@ void CmndShutterPosition(void) } int8_t new_shutterdirection = Shutter[index].real_position < Shutter[index].target_position ? 1 : -1; if (Shutter[index].direction == -new_shutterdirection) { - Shutter[index].start_position = Shutter[index].target_position; + Shutter[index].target_position = Shutter[index].start_position; ShutterPowerOff(index); } if (Shutter[index].direction != new_shutterdirection) {