Exit portal with portal button

This commit is contained in:
Juerd Waalboer 2020-12-22 01:56:52 +01:00
parent 468961e94c
commit f4d1271109
1 changed files with 4 additions and 0 deletions

View File

@ -205,6 +205,10 @@ void setup() {
};
WiFiSettings.onPortalWaitLoop = []() {
if (ota_enabled) ArduinoOTA.handle();
if (!digitalRead(portalbutton)) {
delay(50);
if (!digitalRead(portalbutton)) ESP.restart();
}
};
if (wifi_enabled) WiFiSettings.connect(false, 15);