diff --git a/src/XD0OTA.cpp b/src/XD0OTA.cpp index 1d9f3f0..8586e93 100644 --- a/src/XD0OTA.cpp +++ b/src/XD0OTA.cpp @@ -18,11 +18,14 @@ void XD0OTA::setClock() { Serial.print(F("Waiting for NTP time sync: ")); time_t now = time(nullptr); + int tries = 0; while (now < 8 * 3600 * 2) { yield(); delay(500); Serial.print(F(".")); now = time(nullptr); + tries++; + if (tries>15) return; } Serial.println(F(""));