From fe5dacd144fd82a98ff3f4fdbe0d0bbee6a0547f Mon Sep 17 00:00:00 2001 From: lumapu Date: Thu, 15 Aug 2024 22:08:16 +0200 Subject: [PATCH] 0.8.139 * fix reload after save for WiFi configurations (5s -> 20s) --- src/CHANGES.md | 3 +++ src/defines.h | 2 +- src/web/RestApi.h | 14 +++++++------- src/web/web.h | 4 ++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/CHANGES.md b/src/CHANGES.md index d32fa767..b222fcaf 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,8 @@ # Development Changes +## 0.8.139 - 2024-08-15 +* fix reload after save for WiFi configurations (5s -> 20s) + ## 0.8.138 - 2024-08-15 * fix ePaper not functional #1722 diff --git a/src/defines.h b/src/defines.h index ec5f07b0..7d6c82fc 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 8 -#define VERSION_PATCH 138 +#define VERSION_PATCH 139 //------------------------------------- typedef struct { uint8_t ch; diff --git a/src/web/RestApi.h b/src/web/RestApi.h index 9163839e..eac91cb9 100644 --- a/src/web/RestApi.h +++ b/src/web/RestApi.h @@ -457,8 +457,8 @@ class RestApi { void getHtmlReboot(AsyncWebServerRequest *request, JsonObject obj) { getGeneric(request, obj.createNestedObject(F("generic"))); - #if defined(ETHERNET) && defined(CONFIG_IDF_TARGET_ESP32S3) - obj[F("refresh")] = 5; + #if defined(ETHERNET) + obj[F("refresh")] = (mConfig->sys.eth.enabled) ? 5 : 20; #else obj[F("refresh")] = 20; #endif @@ -471,8 +471,8 @@ class RestApi { obj[F("pending")] = (bool)mApp->getSavePending(); obj[F("success")] = (bool)mApp->getLastSaveSucceed(); obj[F("reboot")] = (bool)mApp->getShouldReboot(); - #if defined(ETHERNET) && defined(CONFIG_IDF_TARGET_ESP32S3) - obj[F("reload")] = 5; + #if defined(ETHERNET) + obj[F("reload")] = (mConfig->sys.eth.enabled) ? 5 : 20; #else obj[F("reload")] = 20; #endif @@ -489,7 +489,7 @@ class RestApi { mApp->setRebootFlag(); obj[F("html")] = F("Erase settings: success"); #if defined(ETHERNET) && defined(CONFIG_IDF_TARGET_ESP32S3) - obj[F("reload")] = 5; + obj[F("reload")] = (mConfig->sys.eth.enabled) ? 5 : 20; #else obj[F("reload")] = 20; #endif @@ -507,8 +507,8 @@ class RestApi { mApp->eraseSettings(true); mApp->setRebootFlag(); obj[F("html")] = F("Factory reset: success"); - #if defined(ETHERNET) && defined(CONFIG_IDF_TARGET_ESP32S3) - obj[F("reload")] = 5; + #if defined(ETHERNET) + obj[F("reload")] = (mConfig->sys.eth.enabled) ? 5 : 20; #else obj[F("reload")] = 20; #endif diff --git a/src/web/web.h b/src/web/web.h index 7ef1474d..b337228a 100644 --- a/src/web/web.h +++ b/src/web/web.h @@ -268,8 +268,8 @@ class Web { bool reboot = (!Update.hasError()); String html = F("Updatesys.eth.enabled) ? F("5") : F("20"); #else html += F("20"); #endif