mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-13 14:51:21 +10:00
fix WL_IDLE_STATUS return values for compatibility
This might need better handling in future, since we only get back a bool of wether or not we are connected, not if configportal was saved etc. might be a problem.
This commit is contained in:
+5
-2
@@ -209,9 +209,12 @@ boolean WiFiManager::startConfigPortal(char const *apName, char const *apPasswo
|
||||
// blocking loop waiting for config
|
||||
while(1){
|
||||
// check if timed out
|
||||
if(configPortalHasTimeout()) return stopConfigPortal();
|
||||
if(configPortalHasTimeout()){
|
||||
stopConfigPortal();
|
||||
return WiFi.status() == WL_CONNECTED; //returns connected bool, ok I guess
|
||||
}
|
||||
ret = handleConfigPortal();
|
||||
if(ret == WL_CONNECTED || ret == WL_CONNECT_FAILED) return ret;
|
||||
if(ret != WL_IDLE_STATUS) return ret == WL_CONNECTED;
|
||||
yield();
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user