fix #283
For some reason defining the exact size is causing mqtt_user and mqtt_pass are not stored in SPIFFs. Dynamic assignment should take care of this. Should take care of expception 28
This commit is contained in:
parent
79393df8a9
commit
181ff7f1d7
1 changed files with 2 additions and 2 deletions
|
@ -1196,7 +1196,7 @@ bool writeConfigFS(bool saveConfig){
|
||||||
//FS save
|
//FS save
|
||||||
updateFS = true;
|
updateFS = true;
|
||||||
DBG_OUTPUT_PORT.print("Saving config: ");
|
DBG_OUTPUT_PORT.print("Saving config: ");
|
||||||
DynamicJsonDocument jsonBuffer(JSON_OBJECT_SIZE(4));
|
DynamicJsonDocument jsonBuffer;
|
||||||
JsonObject json = jsonBuffer.to<JsonObject>();
|
JsonObject json = jsonBuffer.to<JsonObject>();
|
||||||
json["mqtt_host"] = mqtt_host;
|
json["mqtt_host"] = mqtt_host;
|
||||||
json["mqtt_port"] = mqtt_port;
|
json["mqtt_port"] = mqtt_port;
|
||||||
|
@ -1265,7 +1265,7 @@ bool writeStateFS(){
|
||||||
updateFS = true;
|
updateFS = true;
|
||||||
//save the strip state to FS JSON
|
//save the strip state to FS JSON
|
||||||
DBG_OUTPUT_PORT.print("Saving cfg: ");
|
DBG_OUTPUT_PORT.print("Saving cfg: ");
|
||||||
DynamicJsonDocument jsonBuffer(JSON_OBJECT_SIZE(7));
|
DynamicJsonDocument jsonBuffer;
|
||||||
JsonObject json = jsonBuffer.to<JsonObject>();
|
JsonObject json = jsonBuffer.to<JsonObject>();
|
||||||
json["mode"] = static_cast<int>(mode);
|
json["mode"] = static_cast<int>(mode);
|
||||||
json["strip_mode"] = (int) strip.getMode();
|
json["strip_mode"] = (int) strip.getMode();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue