From 8d7a27df76e934446b444985c49124834d4dbc4a Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Fri, 20 Sep 2024 18:20:09 +0200 Subject: [PATCH] Fix ESP8266 Exception 3 on tasmota-minimal caused by unaligned PROGMEM (#22169) --- CHANGELOG.md | 1 + tasmota/include/i18n.h | 2 -- tasmota/tasmota_support/support_command.ino | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca7823132..f88e2d562 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/tasmota/include/i18n.h b/tasmota/include/i18n.h index 085595115..5555ec9d9 100644 --- a/tasmota/include/i18n.h +++ b/tasmota/include/i18n.h @@ -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\"}"; diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index 7a285b0ab..18b805e4b 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -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)) {