diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a1c51bd4..60aa01b6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file. ## [9.0.0.2] ### Added - Support for Vietnamese language translations by Tâm.NT +- Support for timers in case of no-sunset permanent day by cybermaus (#9543) +- Command ``NoDelay`` for immediate backlog command execution by Erik Montnemery (#9544) ### Changed - Command ``Gpio17`` replaces command ``Adc`` @@ -14,6 +16,7 @@ All notable changes to this project will be documented in this file. ### Fixed - Convert AdcParam parameters from versions before v9.0.0.2 - Telegram message decoding error regression from v8.5.0.1 +- Correct Energy period display shortly after midnight by gominoa (#9536) ## [9.0.0.1] - 20201010 ### Added diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 3702663d9..6223962e3 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -59,6 +59,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota ## Changelog v9.0.0.2 ### Added +- Command ``NoDelay`` for immediate backlog command execution by Erik Montnemery (#9544) - Optional support for Mitsubishi Electric HVAC by David Gwynne (#9237) - Optional support for Orno WE517-Modbus energy meter by Maxime Vincent (#9353) - SDM630 three phase ImportActive Energy display when ``#define SDM630_IMPORT`` is enabled by Janusz Kostorz (#9124) @@ -68,6 +69,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota - Zigbee ``ZbData`` command for better support of device specific data - Support for analog buttons indexed within standard button range - Support for Vietnamese language translations by Tâm.NT +- Support for timers in case of no-sunset permanent day by cybermaus (#9543) ### Changed - Redesigned ESP8266 GPIO internal representation in line with ESP32 changing ``Template`` layout too @@ -88,6 +90,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota - Light wakeup exception 0 (divide by zero) when ``WakeupDuration`` is not initialised (#9466) - Thermostat sensor status corruption regression from v8.5.0.1 (#9449) - Telegram message decoding error regression from v8.5.0.1 +- Correct Energy period display shortly after midnight by gominoa (#9536) ### Removed - Support for direct upgrade from Tasmota versions before v7.0 diff --git a/tasmota/i18n.h b/tasmota/i18n.h index c84442348..d6ee87038 100644 --- a/tasmota/i18n.h +++ b/tasmota/i18n.h @@ -212,6 +212,7 @@ // Commands tasmota.ino #define D_CMND_BACKLOG "Backlog" #define D_CMND_DELAY "Delay" +#define D_CMND_NODELAY "NoDelay" #define D_CMND_STATUS "Status" #define D_STATUS1_PARAMETER "PRM" #define D_STATUS2_FIRMWARE "FWR" diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index 5edb089b0..cfd0cb161 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -318,19 +318,25 @@ void setup(void) { void BacklogLoop(void) { if (TimeReached(backlog_delay)) { if (!BACKLOG_EMPTY && !backlog_mutex) { + backlog_mutex = true; + bool nodelay = false; + bool nodelay_detected = false; + String cmd; + do { #ifdef SUPPORT_IF_STATEMENT - backlog_mutex = true; - String cmd = backlog.shift(); - backlog_mutex = false; - ExecuteCommand((char*)cmd.c_str(), SRC_BACKLOG); + cmd = backlog.shift(); #else - backlog_mutex = true; - ExecuteCommand((char*)backlog[backlog_pointer].c_str(), SRC_BACKLOG); - backlog[backlog_pointer] = (const char*) nullptr; // force deallocation of the String internal memory - backlog_pointer++; - if (backlog_pointer >= MAX_BACKLOG) { backlog_pointer = 0; } - backlog_mutex = false; + cmd = backlog[backlog_pointer]; + backlog[backlog_pointer] = (const char*) nullptr; // Force deallocation of the String internal memory + backlog_pointer++; + if (backlog_pointer >= MAX_BACKLOG) { backlog_pointer = 0; } #endif + nodelay_detected = !strncasecmp_P(cmd.c_str(), PSTR(D_CMND_NODELAY), strlen(D_CMND_NODELAY)); + if (nodelay_detected) { nodelay = true; } + } while (nodelay_detected); + ExecuteCommand((char*)cmd.c_str(), SRC_BACKLOG); + if (nodelay) { backlog_delay = 0; } // Reset backlog_delay which has been set by ExecuteCommand (CommandHandler) + backlog_mutex = false; } } }