mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
API updates
This commit is contained in:
@@ -63,16 +63,15 @@ class FSPersistence {
|
||||
// serialize it to filesystem
|
||||
File settingsFile = _fs->open(_filePath, "w");
|
||||
|
||||
#ifdef EMSESP_DEBUG
|
||||
Serial.println("Writing settings to " + String(_filePath));
|
||||
#endif
|
||||
|
||||
// failed to open file, return false
|
||||
if (!settingsFile || !jsonObject.size()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// serialize the data to the file
|
||||
// serialize the data to the file
|
||||
#ifdef EMSESP_DEBUG
|
||||
Serial.println("Writing settings to " + String(_filePath));
|
||||
#endif
|
||||
serializeJson(jsonDocument, settingsFile);
|
||||
settingsFile.close();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user