mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-13 14:51:21 +10:00
#542 handler
This commit is contained in:
+6
-1
@@ -182,7 +182,12 @@ boolean WiFiManager::autoConnect(char const *apName, char const *apPassword) {
|
||||
DEBUG_WM(F("AutoConnect"));
|
||||
|
||||
// attempt to connect using saved settings, on fail fallback to AP config portal
|
||||
WiFi.enableSTA(true);
|
||||
if(!WiFi.enableSTA(true)){
|
||||
// handle failure mode Brownout detector etc.
|
||||
DEBUG_WM("[FATAL] Unable to enable wifi!");
|
||||
return false;
|
||||
}
|
||||
|
||||
_usermode = WIFI_STA;
|
||||
|
||||
// no getter for autoreconnectpolicy before this
|
||||
|
||||
Reference in New Issue
Block a user