diff --git a/GitOTA.cpp b/GitOTA.cpp index f85a020..9a0ec04 100644 --- a/GitOTA.cpp +++ b/GitOTA.cpp @@ -305,6 +305,7 @@ void GitUpdater::toJSON(JsonObject &obj) { obj["error"] = this->error; obj["cancelled"] = this->cancelled; obj["checkForUpdate"] = settings.checkForUpdate; + obj["inetAvailable"] = this->inetAvailable; JsonObject fw = obj.createNestedObject("fwVersion"); settings.fwVersion.toJSON(fw); JsonObject app = obj.createNestedObject("appVersion"); @@ -337,10 +338,12 @@ int GitUpdater::checkInternet() { if (httpCode == HTTP_CODE_OK || httpCode == HTTP_CODE_MOVED_PERMANENTLY || httpCode == HTTP_CODE_FOUND) { err = 0; Serial.printf("Internet is Available: %ldms\n", millis() - t); + this->inetAvailable = true; } else { err = httpCode; Serial.printf("Internet is Unavailable: %d: %ldms\n", err, millis() - t); + this->inetAvailable = false; } https->end(); } diff --git a/GitOTA.h b/GitOTA.h index 98aa5b7..8a4019b 100644 --- a/GitOTA.h +++ b/GitOTA.h @@ -43,6 +43,7 @@ class GitUpdater { uint8_t status = 0; uint32_t lastCheck = 0; bool updateAvailable = false; + bool inetAvailable = false; appver_t latest; bool cancelled = false; int16_t error = 0; diff --git a/SomfyController.ino.esp32.bin b/SomfyController.ino.esp32.bin index de17b99..dcf250d 100644 Binary files a/SomfyController.ino.esp32.bin and b/SomfyController.ino.esp32.bin differ diff --git a/SomfyController.ino.esp32s3.bin b/SomfyController.ino.esp32s3.bin index 72e35b1..5d1a538 100644 Binary files a/SomfyController.ino.esp32s3.bin and b/SomfyController.ino.esp32s3.bin differ