From 59fc09acc40157c0ce00a5c6e1e10451509dcea1 Mon Sep 17 00:00:00 2001 From: stefanbode Date: Mon, 19 Dec 2022 20:31:02 +0100 Subject: [PATCH] Fix on init procedure (#17447) * fix output * Avoid wrong init parameter #17403 --- tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino index 83b005930..c1a143666 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino @@ -395,7 +395,7 @@ 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:Settings->shutter_motorstop; + Settings->shutter_motorstop = Settings->shutter_motorstop == 0?500:Settings->shutter_motorstop>60000?500:Settings->shutter_motorstop; } } @@ -1754,7 +1754,7 @@ void CmndShutterTiltConfig(void) ShutterInit(); } char setting_chr[30] = "0"; - snprintf_P(setting_chr, sizeof(setting_chr), PSTR("%d %d %d %d %d"), XdrvMailbox.index -1,Shutter[XdrvMailbox.index -1].tilt_config[0], Shutter[XdrvMailbox.index -1].tilt_config[1],Shutter[XdrvMailbox.index -1].tilt_config[2],Shutter[XdrvMailbox.index -1].tilt_config[3],Shutter[XdrvMailbox.index -1].tilt_config[4]); + snprintf_P(setting_chr, sizeof(setting_chr), PSTR("%d %d %d %d %d"), Shutter[XdrvMailbox.index -1].tilt_config[0], Shutter[XdrvMailbox.index -1].tilt_config[1],Shutter[XdrvMailbox.index -1].tilt_config[2],Shutter[XdrvMailbox.index -1].tilt_config[3],Shutter[XdrvMailbox.index -1].tilt_config[4]); ResponseCmndIdxChar(setting_chr); AddLog(LOG_LEVEL_INFO, PSTR("SHT: TiltConfig %d, min: %d, max %d, runtime %d, close_pos: %d, open_pos: %d"), XdrvMailbox.index ,Shutter[XdrvMailbox.index -1].tilt_config[0], Shutter[XdrvMailbox.index -1].tilt_config[1],Shutter[XdrvMailbox.index -1].tilt_config[2],Shutter[XdrvMailbox.index -1].tilt_config[3],Shutter[XdrvMailbox.index -1].tilt_config[4]); }