From abfe6f0cbda0f9c3fb8539b786c9a4cde41665bf Mon Sep 17 00:00:00 2001 From: proddy Date: Thu, 30 May 2024 22:01:40 +0200 Subject: [PATCH] add debug notes --- lib/framework/FSPersistence.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/framework/FSPersistence.h b/lib/framework/FSPersistence.h index a7ad681a8..712ed1cb2 100644 --- a/lib/framework/FSPersistence.h +++ b/lib/framework/FSPersistence.h @@ -27,6 +27,7 @@ class FSPersistence { JsonObject jsonObject = jsonDocument.as(); _statefulService->updateWithoutPropagation(jsonObject, _stateUpdater); #ifdef EMSESP_DEBUG + Serial.println(); Serial.printf("Reading settings from %s ", _filePath); serializeJson(jsonDocument, Serial); Serial.println(); @@ -40,7 +41,9 @@ class FSPersistence { // If we reach here we have not been successful in loading the config, // hard-coded emergency defaults are now applied. #ifdef EMSESP_DEBUG - Serial.println("Applying defaults to " + String(_filePath)); + Serial.println(); + Serial.printf("Applying defaults to %s ", _filePath); + Serial.println(); #endif applyDefaults(); writeToFS(); // added to make sure the initial file is created @@ -72,6 +75,7 @@ class FSPersistence { // serialize the data to the file #ifdef EMSESP_DEBUG + Serial.println(); Serial.printf("Writing settings to %s ", _filePath); serializeJson(jsonDocument, Serial); Serial.println();