diff --git a/lib/framework/FSPersistence.h b/lib/framework/FSPersistence.h index 64ec179c2..f0da8cc57 100644 --- a/lib/framework/FSPersistence.h +++ b/lib/framework/FSPersistence.h @@ -66,10 +66,12 @@ class FSPersistence { return false; } - // debug added by Proddy - // Serial.printf("Write File: %s: ", _filePath); - // serializeJson(jsonDocument, Serial); - // Serial.println(); +// debug added by Proddy +#if defined(EMSESP_FORCE_SERIAL) + Serial.printf("Write File: %s: ", _filePath); + serializeJson(jsonDocument, Serial); + Serial.println(); +#endif // serialize the data to the file serializeJson(jsonDocument, settingsFile); diff --git a/lib/framework/OTASettingsService.cpp b/lib/framework/OTASettingsService.cpp index 3fd002448..100892235 100644 --- a/lib/framework/OTASettingsService.cpp +++ b/lib/framework/OTASettingsService.cpp @@ -46,24 +46,23 @@ void OTASettingsService::configureArduinoOTA() { emsesp::System::upload_status(false); }); - /* - _arduinoOTA->onProgress([](unsigned int progress, unsigned int total) { - Serial.printf_P(PSTR("Progress: %u%%\r\n"), (progress / (total / 100))); - }); - _arduinoOTA->onError([](ota_error_t error) { - Serial.printf("Error[%u]: ", error); - if (error == OTA_AUTH_ERROR) - Serial.println(F("Auth Failed")); - else if (error == OTA_BEGIN_ERROR) - Serial.println(F("Begin Failed")); - else if (error == OTA_CONNECT_ERROR) - Serial.println(F("Connect Failed")); - else if (error == OTA_RECEIVE_ERROR) - Serial.println(F("Receive Failed")); - else if (error == OTA_END_ERROR) - Serial.println(F("End Failed")); - }); - */ + // _arduinoOTA->onProgress([](unsigned int progress, unsigned int total) { + // Serial.printf_P(PSTR("Progress: %u%%\r\n"), (progress / (total / 100))); + // }); + // _arduinoOTA->onError([](ota_error_t error) { + // Serial.printf("Error[%u]: ", error); + // if (error == OTA_AUTH_ERROR) + // Serial.println(F("Auth Failed")); + // else if (error == OTA_BEGIN_ERROR) + // Serial.println(F("Begin Failed")); + // else if (error == OTA_CONNECT_ERROR) + // Serial.println(F("Connect Failed")); + // else if (error == OTA_RECEIVE_ERROR) + // Serial.println(F("Receive Failed")); + // else if (error == OTA_END_ERROR) + // Serial.println(F("End Failed")); + // }); + _arduinoOTA->begin(); } }