From cd6de24f14186ee07daa7a308e42dc2984d719f0 Mon Sep 17 00:00:00 2001 From: Norbert Richter Date: Thu, 30 Jul 2020 18:10:29 +0200 Subject: [PATCH] Fix ShutterStopToggleDir init --- tasmota/xdrv_27_shutter.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/tasmota/xdrv_27_shutter.ino b/tasmota/xdrv_27_shutter.ino index 15d5143f1..8bf783680 100644 --- a/tasmota/xdrv_27_shutter.ino +++ b/tasmota/xdrv_27_shutter.ino @@ -238,6 +238,7 @@ void ShutterInit(void) //Shutter.real_position[i] = Settings.shutter_position[i] <= 5 ? Settings.shuttercoeff[2][i] * Settings.shutter_position[i] : Settings.shuttercoeff[1][i] * Settings.shutter_position[i] + Settings.shuttercoeff[0,i]; Shutter.start_position[i] = Shutter.target_position[i] = Shutter.real_position[i]; Shutter.motordelay[i] = Settings.shutter_motordelay[i]; + Shutter.lastdirection[i] = (50 < Settings.shutter_position[i]) ? 1 : -1; char shutter_open_chr[10]; dtostrfd((float)Shutter.open_time[i] / 10 , 1, shutter_open_chr);