Change `Backlog 1; into Backlog0`

This commit is contained in:
Theo Arends 2021-04-07 18:22:20 +02:00
parent d08f9bc315
commit b6e77cd3d7
4 changed files with 15 additions and 16 deletions

View File

@ -17,7 +17,7 @@ All notable changes to this project will be documented in this file.
- Berry add ``gpio`` module - Berry add ``gpio`` module
- Berry add ``light`` module - Berry add ``light`` module
- Support for dummy energy monitor using user values set by commands ``VoltageSet``, ``CurrentSet``, ``PowerSet`` and ``FrequencySet``. Enable by selecting any GPIO as ``Option A2`` (#10640) - Support for dummy energy monitor using user values set by commands ``VoltageSet``, ``CurrentSet``, ``PowerSet`` and ``FrequencySet``. Enable by selecting any GPIO as ``Option A2`` (#10640)
- Command ``Backlog 1;`` to allow execution of following commands without delay - Command ``Backlog0`` to allow execution of following commands without delay
### Changed ### Changed
- PubSubClient library from EspEasy v2.7.12 to Tasmota v2.8.12 - PubSubClient library from EspEasy v2.7.12 to Tasmota v2.8.12

View File

@ -83,7 +83,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
- Command ``Sensor80 1 <0..7>`` to control MFRC522 RFID antenna gain from 18dB (0) to 48dB (7) [#11073](https://github.com/arendst/Tasmota/issues/11073) - Command ``Sensor80 1 <0..7>`` to control MFRC522 RFID antenna gain from 18dB (0) to 48dB (7) [#11073](https://github.com/arendst/Tasmota/issues/11073)
- Command ``SerialBuffer 256..520`` to change hardware serial receive buffer size from default (256) to max local buffer size (520) [#11448](https://github.com/arendst/Tasmota/issues/11448) - Command ``SerialBuffer 256..520`` to change hardware serial receive buffer size from default (256) to max local buffer size (520) [#11448](https://github.com/arendst/Tasmota/issues/11448)
- Command ``SetOption126 1`` to enable DS18x20 arithmetic mean over teleperiod for JSON temperature based on [#11472](https://github.com/arendst/Tasmota/issues/11472) - Command ``SetOption126 1`` to enable DS18x20 arithmetic mean over teleperiod for JSON temperature based on [#11472](https://github.com/arendst/Tasmota/issues/11472)
- Command ``Backlog 1;`` to allow execution of following commands without delay - Command ``Backlog0`` to allow execution of following commands without delay
- Commands ``MqttKeepAlive 1..100`` to set Mqtt Keep Alive timer (default 30) and ``MqttTimeout 1..100`` to set Mqtt Socket Timeout (default 4) [#5341](https://github.com/arendst/Tasmota/issues/5341) - Commands ``MqttKeepAlive 1..100`` to set Mqtt Keep Alive timer (default 30) and ``MqttTimeout 1..100`` to set Mqtt Socket Timeout (default 4) [#5341](https://github.com/arendst/Tasmota/issues/5341)
- Commands ``DisplayType`` to select sub-modules where implemented and ``DisplayInvert`` to select inverted display where implemented - Commands ``DisplayType`` to select sub-modules where implemented and ``DisplayInvert`` to select inverted display where implemented
- Support for SML VBUS [#11125](https://github.com/arendst/Tasmota/issues/11125) - Support for SML VBUS [#11125](https://github.com/arendst/Tasmota/issues/11125)

View File

@ -318,10 +318,13 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len)
/********************************************************************************************/ /********************************************************************************************/
void CmndBacklog(void) { void CmndBacklog(void) {
// Backlog command1;command2;.. Execute commands in sequence with a delay in between set with SetOption34 // Backlog command1;command2;.. Execute commands in sequence with a delay in between set with SetOption34
// Backlog 1;command1;command2;.. Execute commands in sequence with no delay // Backlog0 command1;command2;.. Execute commands in sequence with no delay
if (XdrvMailbox.data_len) { if (XdrvMailbox.data_len) {
if (0 == XdrvMailbox.index) {
TasmotaGlobal.backlog_nodelay = true;
}
#ifdef SUPPORT_IF_STATEMENT #ifdef SUPPORT_IF_STATEMENT
char *blcommand = strtok(XdrvMailbox.data, ";"); char *blcommand = strtok(XdrvMailbox.data, ";");
@ -342,19 +345,15 @@ void CmndBacklog(void) {
} }
} }
if (*blcommand != '\0') { if (*blcommand != '\0') {
if (BACKLOG_EMPTY && ('1' == *blcommand)) {
TasmotaGlobal.backlog_nodelay = true;
} else {
#ifdef SUPPORT_IF_STATEMENT #ifdef SUPPORT_IF_STATEMENT
if (backlog.size() < MAX_BACKLOG) { if (backlog.size() < MAX_BACKLOG) {
backlog.add(blcommand); backlog.add(blcommand);
}
#else
TasmotaGlobal.backlog[TasmotaGlobal.backlog_index] = blcommand;
TasmotaGlobal.backlog_index++;
if (TasmotaGlobal.backlog_index >= MAX_BACKLOG) TasmotaGlobal.backlog_index = 0;
#endif
} }
#else
TasmotaGlobal.backlog[TasmotaGlobal.backlog_index] = blcommand;
TasmotaGlobal.backlog_index++;
if (TasmotaGlobal.backlog_index >= MAX_BACKLOG) TasmotaGlobal.backlog_index = 0;
#endif
} }
blcommand = strtok(nullptr, ";"); blcommand = strtok(nullptr, ";");
} }

View File

@ -1886,7 +1886,7 @@ void LoggingSaveSettings(void)
char tmp7[CMDSZ]; char tmp7[CMDSZ];
WebGetArg(PSTR("lt"), tmp7, sizeof(tmp7)); WebGetArg(PSTR("lt"), tmp7, sizeof(tmp7));
char command[200]; char command[200];
snprintf_P(command, sizeof(command),PSTR(D_CMND_BACKLOG " 1;" D_CMND_SERIALLOG " %s;" D_CMND_WEBLOG " %s;" D_CMND_MQTTLOG " %s;" D_CMND_SYSLOG " %s;" D_CMND_LOGHOST " %s;" D_CMND_LOGPORT " %s;" D_CMND_TELEPERIOD " %s"), snprintf_P(command, sizeof(command),PSTR(D_CMND_BACKLOG "0 " D_CMND_SERIALLOG " %s;" D_CMND_WEBLOG " %s;" D_CMND_MQTTLOG " %s;" D_CMND_SYSLOG " %s;" D_CMND_LOGHOST " %s;" D_CMND_LOGPORT " %s;" D_CMND_TELEPERIOD " %s"),
(!strlen(tmp1)) ? STR(SERIAL_LOG_LEVEL) : tmp1, (!strlen(tmp1)) ? STR(SERIAL_LOG_LEVEL) : tmp1,
(!strlen(tmp2)) ? STR(WEB_LOG_LEVEL) : tmp2, (!strlen(tmp2)) ? STR(WEB_LOG_LEVEL) : tmp2,
(!strlen(tmp3)) ? STR(MQTT_LOG_LEVEL) : tmp3, (!strlen(tmp3)) ? STR(MQTT_LOG_LEVEL) : tmp3,