From ce9ea40166b09a87caef05331f191da6cda88283 Mon Sep 17 00:00:00 2001 From: stefanbode Date: Fri, 9 Oct 2020 09:58:33 +0200 Subject: [PATCH] Update xdrv_27_shutter.ino optimize logging --- tasmota/xdrv_27_shutter.ino | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasmota/xdrv_27_shutter.ino b/tasmota/xdrv_27_shutter.ino index fcdcf820e..d49816c29 100644 --- a/tasmota/xdrv_27_shutter.ino +++ b/tasmota/xdrv_27_shutter.ino @@ -518,14 +518,16 @@ bool ShutterState(uint32_t device) void ShutterAllowPreStartProcedure(uint8_t i) { uint32_t uptime_Local=0; - AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("SH: Delay Start. uptime %d, var%d 99=<%s>, max10s?"),uptime,i, rules_vars[i]); + AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Delay Start. var%d 99==%s, max10s?"),i+1, rules_vars[i+1]); rules_flag.shutter_moving = 1; XdrvRulesProcess(); uptime_Local = uptime; - while (uptime_Local+10 > uptime && (String)rules_vars[i] == "99") { + while (uptime_Local+10 > uptime && (String)rules_vars[i+1] == "99") { loop(); } + AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Delay Start. Done")); } + void ShutterStartInit(uint32_t i, int32_t direction, int32_t target_pos) { //AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: dir %d, delta1 %d, delta2 %d, grant %d"),direction, (Shutter[i].open_max - Shutter[i].real_position) / Shutter[i].close_velocity, Shutter[i].real_position / Shutter[i].close_velocity, 2+Shutter[i].motordelay);