Fix ESP8266 Exception 3 on tasmota-minimal caused by unaligned PROGMEM (#22169)

This commit is contained in:
Theo Arends 2024-09-20 18:20:09 +02:00
parent bf4d0d0890
commit 8d7a27df76
3 changed files with 3 additions and 4 deletions

View File

@ -34,6 +34,7 @@ All notable changes to this project will be documented in this file.
- Berry I2C to prepare M5Stack I2C STM32 based devices (#22143)
- Autoconf prevent 'init.bat' from stopping on empty lines (#22158)
- Compilation exception when metrics not found (#22170)
- ESP8266 Exception 3 on tasmota-minimal caused by unaligned PROGMEM (#22169)
### Removed

View File

@ -901,8 +901,6 @@
#endif
// Common
const char S_JSON_COMMAND_ERROR[] PROGMEM = "{\"" D_JSON_COMMAND "\":\"" D_JSON_ERROR "\"";
const char S_JSON_COMMAND_NVALUE_SPACE_UNIT[] PROGMEM = "{\"%s\":\"%d %s\"}";
const char S_JSON_COMMAND_LVALUE_SPACE_UNIT[] PROGMEM = "{\"%s\":\"%lu %s\"}";
const char S_JSON_COMMAND_SVALUE_SPACE_UNIT[] PROGMEM = "{\"%s\":\"%s %s\"}";

View File

@ -415,7 +415,7 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) {
}
}
Response_P(S_JSON_COMMAND_ERROR); // Prep error message for either Command Error or Command Unknown
Response_P(PSTR("{\"" D_JSON_COMMAND "\":\"" D_JSON_ERROR "\"")); // Prep error message for either Command Error or Command Unknown
char number[12];
ResponseAppend_P(PSTR(",\"Input\":\"%s%s%s%s\"}"),
type,
@ -468,7 +468,7 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) {
#endif // USE_SCRIPT_SUB_COMMAND
}
if (ResponseStartsWith(S_JSON_COMMAND_ERROR)) {
if (ResponseStartsWith("{\"" D_JSON_COMMAND "\":\"" D_JSON_ERROR "\"")) {
// No calls to Response_P performed if got here so it's either Command Error or Unknown
TasmotaGlobal.no_mqtt_response = false; // Make sure to report commands starting with underline
if (!strlen(type)) {