Skip to content

Commit

Permalink
Revert "Fix ESP8266 Exception 3 on tasmota-minimal caused by unaligne…
Browse files Browse the repository at this point in the history
…d PROGMEM (#22169)"

This reverts commit b00d7fd.
  • Loading branch information
arendst committed Sep 20, 2024
1 parent b00d7fd commit bf4d0d0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ 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

Expand Down
2 changes: 2 additions & 0 deletions tasmota/include/i18n.h
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,8 @@
#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\"}";
Expand Down
4 changes: 2 additions & 2 deletions tasmota/tasmota_support/support_command.ino
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) {
}
}

Response_P(PSTR("{\"" D_JSON_COMMAND "\":\"" D_JSON_ERROR "\"")); // Prep error message for either Command Error or Command Unknown
Response_P(S_JSON_COMMAND_ERROR); // Prep error message for either Command Error or Command Unknown
char number[12];
ResponseAppend_P(PSTR(",\"Input\":\"%s%s%s%s\"}"),
type,
Expand Down Expand Up @@ -468,7 +468,7 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) {
#endif // USE_SCRIPT_SUB_COMMAND
}

if (ResponseStartsWith(PSTR("{\"" D_JSON_COMMAND "\":\"" D_JSON_ERROR "\""))) {
if (ResponseStartsWith(S_JSON_COMMAND_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)) {
Expand Down

0 comments on commit bf4d0d0

Please sign in to comment.