mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
remove Serial
This commit is contained in:
@@ -34,12 +34,10 @@ class FSPersistence {
|
||||
|
||||
// debug added by Proddy
|
||||
#if defined(EMSESP_DEBUG)
|
||||
#if defined(EMSESP_USE_SERIAL)
|
||||
Serial.println();
|
||||
Serial.printf("Reading file: %s: ", _filePath);
|
||||
serializeJson(jsonDocument, Serial);
|
||||
Serial.println();
|
||||
#endif
|
||||
#endif
|
||||
_statefulService->updateWithoutPropagation(jsonObject, _stateUpdater);
|
||||
settingsFile.close();
|
||||
@@ -51,11 +49,9 @@ class FSPersistence {
|
||||
// If we reach here we have not been successful in loading the config,
|
||||
// hard-coded emergency defaults are now applied.
|
||||
#if defined(EMSESP_DEBUG)
|
||||
#if defined(EMSESP_USE_SERIAL)
|
||||
Serial.println();
|
||||
Serial.printf("Applying defaults for %s: ", _filePath);
|
||||
Serial.println();
|
||||
#endif
|
||||
#endif
|
||||
applyDefaults();
|
||||
writeToFS(); // added to make sure the initial file is created
|
||||
@@ -83,23 +79,19 @@ class FSPersistence {
|
||||
// failed to open file, return false
|
||||
if (!settingsFile || !jsonObject.size()) {
|
||||
#if defined(EMSESP_DEBUG)
|
||||
#if defined(EMSESP_USE_SERIAL)
|
||||
Serial.println();
|
||||
Serial.printf("Cannot write to file system.");
|
||||
Serial.println();
|
||||
#endif
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
// debug added by Proddy
|
||||
#if defined(EMSESP_DEBUG)
|
||||
#if defined(EMSESP_USE_SERIAL)
|
||||
Serial.println();
|
||||
Serial.printf("Writing to file: %s: ", _filePath);
|
||||
serializeJson(jsonDocument, Serial);
|
||||
Serial.println();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// serialize the data to the file
|
||||
|
||||
Reference in New Issue
Block a user