From 4033637b82af728de3a400c760bd5b83de2249b9 Mon Sep 17 00:00:00 2001 From: Pavel Brychta Date: Fri, 4 Oct 2019 10:50:35 +0200 Subject: [PATCH] Indikace stavu pripojeni pro ESP32 --- src/WiFiConfig.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/WiFiConfig.cpp b/src/WiFiConfig.cpp index 9c7f145..84b0e47 100644 --- a/src/WiFiConfig.cpp +++ b/src/WiFiConfig.cpp @@ -84,6 +84,7 @@ #include #else #include + #include // duvod resetu (https://github.com/espressif/arduino-esp32/issues/449) #endif #include "WiFiConfig.h" #include @@ -458,7 +459,24 @@ void WiFiConfig::_handleRoot(void) break; } #else - content.concat(F("Prozatím nedostupné")); + switch (_status) + { + case WL_CONNECT_FAILED: + content.concat(F("Připojení selhalo")); + break; + + case 0xfe: + content.concat(F("Špatná EEPROM")); + break; + + case 0xff: + content.concat(F("Vynucená konfigurace")); + break; + + default: + content.concat(F("Neznámý")); + break; + } #endif content.concat(F("")); content.concat(FPSTR(PAGE_CAPTIVEPORTALCATCH2)); // 2. cast stranky (ukonceni)