This commit is contained in:
proddy
2020-11-14 12:49:10 +01:00
parent 5219cf60f1
commit 842683aae1
2 changed files with 23 additions and 22 deletions

View File

@@ -66,10 +66,12 @@ class FSPersistence {
return false; return false;
} }
// debug added by Proddy // debug added by Proddy
// Serial.printf("Write File: %s: ", _filePath); #if defined(EMSESP_FORCE_SERIAL)
// serializeJson(jsonDocument, Serial); Serial.printf("Write File: %s: ", _filePath);
// Serial.println(); serializeJson(jsonDocument, Serial);
Serial.println();
#endif
// serialize the data to the file // serialize the data to the file
serializeJson(jsonDocument, settingsFile); serializeJson(jsonDocument, settingsFile);

View File

@@ -46,24 +46,23 @@ void OTASettingsService::configureArduinoOTA() {
emsesp::System::upload_status(false); emsesp::System::upload_status(false);
}); });
/* // _arduinoOTA->onProgress([](unsigned int progress, unsigned int total) {
_arduinoOTA->onProgress([](unsigned int progress, unsigned int total) { // Serial.printf_P(PSTR("Progress: %u%%\r\n"), (progress / (total / 100)));
Serial.printf_P(PSTR("Progress: %u%%\r\n"), (progress / (total / 100))); // });
}); // _arduinoOTA->onError([](ota_error_t error) {
_arduinoOTA->onError([](ota_error_t error) { // Serial.printf("Error[%u]: ", error);
Serial.printf("Error[%u]: ", error); // if (error == OTA_AUTH_ERROR)
if (error == OTA_AUTH_ERROR) // Serial.println(F("Auth Failed"));
Serial.println(F("Auth Failed")); // else if (error == OTA_BEGIN_ERROR)
else if (error == OTA_BEGIN_ERROR) // Serial.println(F("Begin Failed"));
Serial.println(F("Begin Failed")); // else if (error == OTA_CONNECT_ERROR)
else if (error == OTA_CONNECT_ERROR) // Serial.println(F("Connect Failed"));
Serial.println(F("Connect Failed")); // else if (error == OTA_RECEIVE_ERROR)
else if (error == OTA_RECEIVE_ERROR) // Serial.println(F("Receive Failed"));
Serial.println(F("Receive Failed")); // else if (error == OTA_END_ERROR)
else if (error == OTA_END_ERROR) // Serial.println(F("End Failed"));
Serial.println(F("End Failed")); // });
});
*/
_arduinoOTA->begin(); _arduinoOTA->begin();
} }
} }