Indikace stavu pripojeni pro ESP32

This commit is contained in:
Pavel Brychta 2019-10-04 10:50:35 +02:00
parent ed1659791a
commit 4033637b82

View File

@ -84,6 +84,7 @@
#include <ESP8266WebServer.h> #include <ESP8266WebServer.h>
#else #else
#include <WebServer.h> #include <WebServer.h>
#include <rom/rtc.h> // duvod resetu (https://github.com/espressif/arduino-esp32/issues/449)
#endif #endif
#include "WiFiConfig.h" #include "WiFiConfig.h"
#include <EEPROM.h> #include <EEPROM.h>
@ -458,7 +459,24 @@ void WiFiConfig::_handleRoot(void)
break; break;
} }
#else #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 #endif
content.concat(F("</div>")); content.concat(F("</div>"));
content.concat(FPSTR(PAGE_CAPTIVEPORTALCATCH2)); // 2. cast stranky (ukonceni) content.concat(FPSTR(PAGE_CAPTIVEPORTALCATCH2)); // 2. cast stranky (ukonceni)