From 0c588f2ff4e1605ee278489d36f5a592fb4c8da4 Mon Sep 17 00:00:00 2001 From: stefanbode Date: Fri, 23 Dec 2022 09:53:10 +0100 Subject: [PATCH] better fix on init (#17488) try to avoid get 5000 if the init value is 65535. More focus on setting the standard of 500 on nearly any case --- tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino index fa4c6b1e2..356042d32 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino @@ -402,7 +402,10 @@ void ShutterInit(void) Settings->shutter_accuracy = 1; Settings->shutter_mode = ShutterGlobal.position_mode; // initialize MotorStop time with 500ms if not set - Settings->shutter_motorstop = (Settings->shutter_motorstop == 0) ? 500 : tmin(5000,Settings->shutter_motorstop); + // typical not set start values are 0 and 65535 + if (Settings->shutter_motorstop > 5000 || Settings->shutter_motorstop == 0) { + Settings->shutter_motorstop = 500; + } } }