Minor changes
This commit is contained in:
@ -289,7 +289,7 @@ void loadStatus(void)
|
|||||||
String jsonFile = file.readString();
|
String jsonFile = file.readString();
|
||||||
DynamicJsonDocument json(32);
|
DynamicJsonDocument json(32);
|
||||||
deserializeJson(json, jsonFile);
|
deserializeJson(json, jsonFile);
|
||||||
relayStatus = json["relayStatus"];
|
relayStatus = json["status"];
|
||||||
file.close();
|
file.close();
|
||||||
delay(50);
|
delay(50);
|
||||||
ETS_GPIO_INTR_ENABLE();
|
ETS_GPIO_INTR_ENABLE();
|
||||||
@ -299,7 +299,7 @@ void saveStatus(void)
|
|||||||
{
|
{
|
||||||
ETS_GPIO_INTR_DISABLE();
|
ETS_GPIO_INTR_DISABLE();
|
||||||
DynamicJsonDocument json(32);
|
DynamicJsonDocument json(32);
|
||||||
json["relayStatus"] = relayStatus;
|
json["status"] = relayStatus;
|
||||||
json["system"] = "empty";
|
json["system"] = "empty";
|
||||||
File file = LittleFS.open("/status.json", "w");
|
File file = LittleFS.open("/status.json", "w");
|
||||||
serializeJsonPretty(json, file);
|
serializeJsonPretty(json, file);
|
||||||
|
Reference in New Issue
Block a user