mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-26 04:06:34 +00:00
Embeded IF statement in backlog did not been processed
The backlog_mutex blocked the execution of IF statement during call ExecuteCommand(), because all IF statement need to use backlog to perform commands.
This commit is contained in:
parent
00fd7f2f7c
commit
ee37c258e6
@ -349,15 +349,18 @@ void BacklogLoop(void)
|
|||||||
{
|
{
|
||||||
if (TimeReached(backlog_delay)) {
|
if (TimeReached(backlog_delay)) {
|
||||||
if (!BACKLOG_EMPTY && !backlog_mutex) {
|
if (!BACKLOG_EMPTY && !backlog_mutex) {
|
||||||
backlog_mutex = true;
|
|
||||||
#ifdef SUPPORT_IF_STATEMENT
|
#ifdef SUPPORT_IF_STATEMENT
|
||||||
ExecuteCommand((char*)backlog.shift().c_str(), SRC_BACKLOG);
|
backlog_mutex = true;
|
||||||
|
String cmd = backlog.shift();
|
||||||
|
backlog_mutex = false;
|
||||||
|
ExecuteCommand((char*)cmd.c_str(), SRC_BACKLOG);
|
||||||
#else
|
#else
|
||||||
|
backlog_mutex = true;
|
||||||
ExecuteCommand((char*)backlog[backlog_pointer].c_str(), SRC_BACKLOG);
|
ExecuteCommand((char*)backlog[backlog_pointer].c_str(), SRC_BACKLOG);
|
||||||
backlog_pointer++;
|
backlog_pointer++;
|
||||||
if (backlog_pointer >= MAX_BACKLOG) { backlog_pointer = 0; }
|
if (backlog_pointer >= MAX_BACKLOG) { backlog_pointer = 0; }
|
||||||
#endif
|
|
||||||
backlog_mutex = false;
|
backlog_mutex = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user