NetDebug: store enabled in cfg.json

This commit is contained in:
Ewoud
2023-02-24 22:32:04 +01:00
parent f00558c5f4
commit ebd1e61e78
5 changed files with 1102 additions and 1087 deletions

View File

@@ -17,6 +17,10 @@ void getStringFromJson(char* dest, const char* src, size_t len) {
}
bool deserializeConfig(JsonObject doc, bool fromFS) {
//WLEDMM add USER_PRINT
USER_PRINTF("deserializeConfig\n");
bool needsSave = false;
//int rev_major = doc["rev"][0]; // 1
//int rev_minor = doc["rev"][1]; // 0
@@ -1022,6 +1026,9 @@ void serializeConfig() {
JsonObject usermods_settings = doc.createNestedObject("um");
usermods.addToConfig(usermods_settings);
//WLEDMM add USER_PRINT
USER_PRINTF("serializeConfig\n");
File f = WLED_FS.open("/cfg.json", "w");
if (f) serializeJson(doc, f);
f.close();