mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-26 20:26:32 +00:00
6.2.0.1 - Fix StateText ambiguity
Fix possible ambiguity on command parameters if StateText contains numbers only (#3656)
This commit is contained in:
parent
d57dad2499
commit
48b5f9117a
@ -1,4 +1,7 @@
|
|||||||
/* 6.2.0 20180901
|
/* 6.2.0.1 20180902
|
||||||
|
* Fix possible ambiguity on command parameters if StateText contains numbers only (#3656)
|
||||||
|
*
|
||||||
|
* 6.2.0 20180901
|
||||||
* Allow user override of define MAX_RULE_VARS and MAX_RULE_TIMERS (#3561)
|
* Allow user override of define MAX_RULE_VARS and MAX_RULE_TIMERS (#3561)
|
||||||
* Disable wifi sleep for both Esp8266/Arduino core 2.4.1 and 2.4.2 to solve device freeze caused by Espressif SDK bug (#3554)
|
* Disable wifi sleep for both Esp8266/Arduino core 2.4.1 and 2.4.2 to solve device freeze caused by Espressif SDK bug (#3554)
|
||||||
* Change DS18B20 driver to provide better instant results
|
* Change DS18B20 driver to provide better instant results
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#ifndef _SONOFF_VERSION_H_
|
#ifndef _SONOFF_VERSION_H_
|
||||||
#define _SONOFF_VERSION_H_
|
#define _SONOFF_VERSION_H_
|
||||||
|
|
||||||
#define VERSION 0x06020000
|
#define VERSION 0x06020001
|
||||||
|
|
||||||
#define D_PROGRAMNAME "Sonoff-Tasmota"
|
#define D_PROGRAMNAME "Sonoff-Tasmota"
|
||||||
#define D_AUTHOR "Theo Arends"
|
#define D_AUTHOR "Theo Arends"
|
||||||
|
@ -561,13 +561,13 @@ int GetStateNumber(char *state_text)
|
|||||||
char command[CMDSZ];
|
char command[CMDSZ];
|
||||||
int state_number = -1;
|
int state_number = -1;
|
||||||
|
|
||||||
if ((GetCommandCode(command, sizeof(command), state_text, kOptionOff) >= 0) || !strcasecmp(state_text, Settings.state_text[0])) {
|
if (GetCommandCode(command, sizeof(command), state_text, kOptionOff) >= 0) {
|
||||||
state_number = 0;
|
state_number = 0;
|
||||||
}
|
}
|
||||||
else if ((GetCommandCode(command, sizeof(command), state_text, kOptionOn) >= 0) || !strcasecmp(state_text, Settings.state_text[1])) {
|
else if (GetCommandCode(command, sizeof(command), state_text, kOptionOn) >= 0) {
|
||||||
state_number = 1;
|
state_number = 1;
|
||||||
}
|
}
|
||||||
else if ((GetCommandCode(command, sizeof(command), state_text, kOptionToggle) >= 0) || !strcasecmp(state_text, Settings.state_text[2])) {
|
else if (GetCommandCode(command, sizeof(command), state_text, kOptionToggle) >= 0) {
|
||||||
state_number = 2;
|
state_number = 2;
|
||||||
}
|
}
|
||||||
else if (GetCommandCode(command, sizeof(command), state_text, kOptionBlink) >= 0) {
|
else if (GetCommandCode(command, sizeof(command), state_text, kOptionBlink) >= 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user