mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 02:36:35 +00:00
Command lookup table in support_command.ino broken for ESP32 (#23461)
I observed that the definition of command names became mangled with commit 2bc5f682b0
due to vertical bar not being placed where it should. With no bar after `D_CMND_CPU_FREQUENCY`, the command name became concatenated with the next `D_CMND_SETSENSOR` with the "funny" effect that command name `CpuFrequencySetSensor` got matched with `&CmndSetSensor`
The reason for it not being matched with `&CmndCpuFrequency` is that there is a bar too many before the `Info` command name, as previous command name lines all finish with `"|"`. Hence an extra command table entry was created, meaning that the mismatch "only" affected command names `Info`, `TouchCal`, `TouchThres`, `CpuFrequency` and `SetSensor`.
Issue is only for ESP32, as both mishaps happened in a block conditional on `#ifdef ESP32`.
Arguably, it could make sense to have all the lines with command names start with `"|"` as a consistent way of formatting the lines without the special case of ending `"|"` to be omitted for the very last command name line, but I wanted to only make minimal changes
This commit is contained in:
parent
4f4bf7c61b
commit
b684486570
@ -54,11 +54,11 @@ const char kTasmotaCommands[] PROGMEM = "|" // No prefix
|
||||
#endif // USE_UFILESYS
|
||||
|
||||
#ifdef ESP32
|
||||
"|Info|"
|
||||
"Info|"
|
||||
#if defined(SOC_TOUCH_VERSION_1) || defined(SOC_TOUCH_VERSION_2)
|
||||
D_CMND_TOUCH_CAL "|" D_CMND_TOUCH_THRES "|"
|
||||
#endif // ESP32 SOC_TOUCH_VERSION_1 or SOC_TOUCH_VERSION_2
|
||||
D_CMND_CPU_FREQUENCY
|
||||
D_CMND_CPU_FREQUENCY "|"
|
||||
#endif // ESP32
|
||||
|
||||
D_CMND_SETSENSOR "|" D_CMND_SENSOR "|" D_CMND_DRIVER "|" D_CMND_JSON "|" D_CMND_JSON_PP
|
||||
|
Loading…
x
Reference in New Issue
Block a user