Error message on ArduinoOTA
continuous-integration/drone/push Build is failing Details
continuous-integration/drone Build is failing Details

This commit is contained in:
starcalc 2022-08-30 20:14:46 +02:00
parent b99e6f91dc
commit 37cca59f8e
1 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,14 @@ void setup() {
ArduinoOTA.onStart([]() {
Homie.getLogger() << "Arduino OTA angefragt" << endl;
});
ArduinoOTA.onError([](ota_error_t error) {
Serial.printf("Error[%u]: ", error);
if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
else if (error == OTA_END_ERROR) Serial.println("End Failed");
});
ArduinoOTA.begin();
}