|
@ -457,8 +457,8 @@ class RestApi { |
|
|
|
|
|
|
|
|
void getHtmlReboot(AsyncWebServerRequest *request, JsonObject obj) { |
|
|
void getHtmlReboot(AsyncWebServerRequest *request, JsonObject obj) { |
|
|
getGeneric(request, obj.createNestedObject(F("generic"))); |
|
|
getGeneric(request, obj.createNestedObject(F("generic"))); |
|
|
#if defined(ETHERNET) && defined(CONFIG_IDF_TARGET_ESP32S3) |
|
|
#if defined(ETHERNET) |
|
|
obj[F("refresh")] = 5; |
|
|
obj[F("refresh")] = (mConfig->sys.eth.enabled) ? 5 : 20; |
|
|
#else |
|
|
#else |
|
|
obj[F("refresh")] = 20; |
|
|
obj[F("refresh")] = 20; |
|
|
#endif |
|
|
#endif |
|
@ -471,8 +471,8 @@ class RestApi { |
|
|
obj[F("pending")] = (bool)mApp->getSavePending(); |
|
|
obj[F("pending")] = (bool)mApp->getSavePending(); |
|
|
obj[F("success")] = (bool)mApp->getLastSaveSucceed(); |
|
|
obj[F("success")] = (bool)mApp->getLastSaveSucceed(); |
|
|
obj[F("reboot")] = (bool)mApp->getShouldReboot(); |
|
|
obj[F("reboot")] = (bool)mApp->getShouldReboot(); |
|
|
#if defined(ETHERNET) && defined(CONFIG_IDF_TARGET_ESP32S3) |
|
|
#if defined(ETHERNET) |
|
|
obj[F("reload")] = 5; |
|
|
obj[F("reload")] = (mConfig->sys.eth.enabled) ? 5 : 20; |
|
|
#else |
|
|
#else |
|
|
obj[F("reload")] = 20; |
|
|
obj[F("reload")] = 20; |
|
|
#endif |
|
|
#endif |
|
@ -489,7 +489,7 @@ class RestApi { |
|
|
mApp->setRebootFlag(); |
|
|
mApp->setRebootFlag(); |
|
|
obj[F("html")] = F("Erase settings: success"); |
|
|
obj[F("html")] = F("Erase settings: success"); |
|
|
#if defined(ETHERNET) && defined(CONFIG_IDF_TARGET_ESP32S3) |
|
|
#if defined(ETHERNET) && defined(CONFIG_IDF_TARGET_ESP32S3) |
|
|
obj[F("reload")] = 5; |
|
|
obj[F("reload")] = (mConfig->sys.eth.enabled) ? 5 : 20; |
|
|
#else |
|
|
#else |
|
|
obj[F("reload")] = 20; |
|
|
obj[F("reload")] = 20; |
|
|
#endif |
|
|
#endif |
|
@ -507,8 +507,8 @@ class RestApi { |
|
|
mApp->eraseSettings(true); |
|
|
mApp->eraseSettings(true); |
|
|
mApp->setRebootFlag(); |
|
|
mApp->setRebootFlag(); |
|
|
obj[F("html")] = F("Factory reset: success"); |
|
|
obj[F("html")] = F("Factory reset: success"); |
|
|
#if defined(ETHERNET) && defined(CONFIG_IDF_TARGET_ESP32S3) |
|
|
#if defined(ETHERNET) |
|
|
obj[F("reload")] = 5; |
|
|
obj[F("reload")] = (mConfig->sys.eth.enabled) ? 5 : 20; |
|
|
#else |
|
|
#else |
|
|
obj[F("reload")] = 20; |
|
|
obj[F("reload")] = 20; |
|
|
#endif |
|
|
#endif |
|
|