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:
sfromis 2025-05-22 22:13:52 +02:00 committed by GitHub
parent 4f4bf7c61b
commit b684486570
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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