From 074aec0a23708c24dc1088f208b85e04f5ee16e3 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 15 Oct 2020 15:33:17 +0200 Subject: [PATCH] Adjust command ``NoDelay`` --- tasmota/support_command.ino | 1 + tasmota/tasmota.ino | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tasmota/support_command.ino b/tasmota/support_command.ino index 4272f70d5..4e3702dda 100644 --- a/tasmota/support_command.ino +++ b/tasmota/support_command.ino @@ -344,6 +344,7 @@ void CmndBacklog(void) } // ResponseCmndChar(D_JSON_APPENDED); mqtt_data[0] = '\0'; + backlog_delay = 0; } else { bool blflag = BACKLOG_EMPTY; #ifdef SUPPORT_IF_STATEMENT diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index cfd0cb161..e85f9f4fc 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -333,8 +333,8 @@ void BacklogLoop(void) { #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); + } while (!BACKLOG_EMPTY && nodelay_detected); + if (!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; }