mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-13 14:51:21 +10:00
Merge branch 'master' into development
This commit is contained in:
+13
-1
@@ -160,6 +160,14 @@ boolean WiFiManager::autoConnect(char const *apName, char const *apPassword) {
|
||||
return startConfigPortal(apName, apPassword);
|
||||
}
|
||||
|
||||
boolean WiFiManager::configPortalHasTimeout(){
|
||||
if(_configPortalTimeout == 0 || wifi_softap_get_station_num() > 0){
|
||||
_configPortalStart = millis(); // kludge, bump configportal start time to skew timeouts
|
||||
return false;
|
||||
}
|
||||
return (millis() > _configPortalStart + _configPortalTimeout);
|
||||
}
|
||||
|
||||
boolean WiFiManager::startConfigPortal() {
|
||||
String ssid = "ESP" + String(ESP.getChipId());
|
||||
return startConfigPortal(ssid.c_str(), NULL);
|
||||
@@ -181,7 +189,11 @@ boolean WiFiManager::startConfigPortal(char const *apName, char const *apPasswo
|
||||
connect = false;
|
||||
setupConfigPortal();
|
||||
|
||||
while (_configPortalTimeout == 0 || millis() < _configPortalStart + _configPortalTimeout) {
|
||||
while(1){
|
||||
|
||||
// check if timeout
|
||||
if(configPortalHasTimeout()) break;
|
||||
|
||||
//DNS
|
||||
dnsServer->processNextRequest();
|
||||
//HTTP
|
||||
|
||||
Reference in New Issue
Block a user