mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
add debug notes
This commit is contained in:
@@ -27,6 +27,7 @@ class FSPersistence {
|
|||||||
JsonObject jsonObject = jsonDocument.as<JsonObject>();
|
JsonObject jsonObject = jsonDocument.as<JsonObject>();
|
||||||
_statefulService->updateWithoutPropagation(jsonObject, _stateUpdater);
|
_statefulService->updateWithoutPropagation(jsonObject, _stateUpdater);
|
||||||
#ifdef EMSESP_DEBUG
|
#ifdef EMSESP_DEBUG
|
||||||
|
Serial.println();
|
||||||
Serial.printf("Reading settings from %s ", _filePath);
|
Serial.printf("Reading settings from %s ", _filePath);
|
||||||
serializeJson(jsonDocument, Serial);
|
serializeJson(jsonDocument, Serial);
|
||||||
Serial.println();
|
Serial.println();
|
||||||
@@ -40,7 +41,9 @@ class FSPersistence {
|
|||||||
// If we reach here we have not been successful in loading the config,
|
// If we reach here we have not been successful in loading the config,
|
||||||
// hard-coded emergency defaults are now applied.
|
// hard-coded emergency defaults are now applied.
|
||||||
#ifdef EMSESP_DEBUG
|
#ifdef EMSESP_DEBUG
|
||||||
Serial.println("Applying defaults to " + String(_filePath));
|
Serial.println();
|
||||||
|
Serial.printf("Applying defaults to %s ", _filePath);
|
||||||
|
Serial.println();
|
||||||
#endif
|
#endif
|
||||||
applyDefaults();
|
applyDefaults();
|
||||||
writeToFS(); // added to make sure the initial file is created
|
writeToFS(); // added to make sure the initial file is created
|
||||||
@@ -72,6 +75,7 @@ class FSPersistence {
|
|||||||
|
|
||||||
// serialize the data to the file
|
// serialize the data to the file
|
||||||
#ifdef EMSESP_DEBUG
|
#ifdef EMSESP_DEBUG
|
||||||
|
Serial.println();
|
||||||
Serial.printf("Writing settings to %s ", _filePath);
|
Serial.printf("Writing settings to %s ", _filePath);
|
||||||
serializeJson(jsonDocument, Serial);
|
serializeJson(jsonDocument, Serial);
|
||||||
Serial.println();
|
Serial.println();
|
||||||
|
|||||||
Reference in New Issue
Block a user