Skip to content

Commit

Permalink
Fix ESP32 LoadStoreError when using #define USER_TEMPLATE
Browse files Browse the repository at this point in the history
Fix ESP32 LoadStoreError when using ``#define USER_TEMPLATE`` (#9506)
  • Loading branch information
arendst committed Dec 20, 2020
1 parent 7599dab commit 09bb1ec
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
- Redesign syslog and mqttlog using log buffer (#10164)
- Shelly Dimmer power on state (#10154, #10182)
- Wemo emulation for single devices (#10165, #10194)
- ESP32 LoadStoreError when using ``#define USER_TEMPLATE`` (#9506)

## [Released]

Expand Down
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
- Redesign syslog and mqttlog using log buffer (#10164)
- Shelly Dimmer power on state (#10154, #10182)
- Wemo emulation for single devices (#10165, #10194)
- ESP32 LoadStoreError when using ``#define USER_TEMPLATE`` (#9506)
2 changes: 1 addition & 1 deletion tasmota/my_user_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
//#define MODULE SONOFF_BASIC // [Module] Select default module from tasmota_template.h
#ifdef ESP8266
#define FALLBACK_MODULE SONOFF_BASIC // [Module2] Select default module on fast reboot where USER_MODULE is user template
//#define USER_TEMPLATE "{\"NAME\":\"Generic\",\"GPIO\":[255,255,255,255,255,255,255,255,255,255,255,255,255],\"FLAG\":15,\"BASE\":18}" // [Template] Set JSON template
//#define USER_TEMPLATE "{\"NAME\":\"Generic\",\"GPIO\":[1,1,1,1,1,1,1,1,1,1,1,1,1,1],\"FLAG\":0,\"BASE\":18}" // [Template] Set JSON template
#endif // ESP8266
#ifdef ESP32
#define FALLBACK_MODULE WEMOS // [Module2] Select default module on fast reboot where USER_MODULE is user template
Expand Down
3 changes: 2 additions & 1 deletion tasmota/settings.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,8 @@ void SettingsDefaultSet2(void)
flag4.mqtt_no_retain |= MQTT_NO_RETAIN;

#ifdef USER_TEMPLATE
JsonTemplate((char *)USER_TEMPLATE);
String user_template = USER_TEMPLATE;
JsonTemplate((char*)user_template.c_str());
#endif

Settings.flag = flag;
Expand Down

0 comments on commit 09bb1ec

Please sign in to comment.