mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-13 14:51:21 +10:00
#1243 clean
This commit is contained in:
+9
-4
@@ -785,15 +785,20 @@ uint8_t WiFiManager::processConfigPortal(){
|
||||
if (connectWifi(_ssid, _pass, _connectonsave) == WL_CONNECTED) {
|
||||
|
||||
#ifdef WM_DEBUG_LEVEL
|
||||
DEBUG_WM(F("Connect to new AP [SUCCESS]"));
|
||||
DEBUG_WM(F("Got IP Address:"));
|
||||
DEBUG_WM(WiFi.localIP());
|
||||
if(_connectonsave){
|
||||
DEBUG_WM(F("SAVED with no connect to new AP"));
|
||||
} else {
|
||||
DEBUG_WM(F("Connect to new AP [SUCCESS]"));
|
||||
DEBUG_WM(F("Got IP Address:"));
|
||||
DEBUG_WM(WiFi.localIP());
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( _savewificallback != NULL) {
|
||||
_savewificallback();
|
||||
}
|
||||
shutdownConfigPortal();
|
||||
if(_connectonsave) return WL_IDLE_STATUS;
|
||||
return WL_CONNECTED; // CONNECT SUCCESS
|
||||
}
|
||||
#ifdef WM_DEBUG_LEVEL
|
||||
@@ -920,7 +925,7 @@ uint8_t WiFiManager::connectWifi(String ssid, String pass, bool connect) {
|
||||
wifiConnectNew(ssid,pass,connect);
|
||||
if(_saveTimeout > 0){
|
||||
connRes = waitForConnectResult(_saveTimeout); // use default save timeout for saves to prevent bugs in esp->waitforconnectresult loop
|
||||
}
|
||||
}
|
||||
else {
|
||||
connRes = waitForConnectResult(0);
|
||||
}
|
||||
|
||||
+1
-1
@@ -432,7 +432,7 @@ class WiFiManager
|
||||
unsigned long _startscan = 0; // ms for timing wifi scans
|
||||
int _cpclosedelay = 2000; // delay before wifisave, prevents captive portal from closing to fast.
|
||||
bool _cleanConnect = false; // disconnect before connect in connectwifi, increases stability on connects
|
||||
bool _connectOnsave = true; // connect to wifi when saving creds
|
||||
bool _connectonsave = true; // connect to wifi when saving creds
|
||||
bool _disableSTA = false; // disable sta when starting ap, always
|
||||
bool _disableSTAConn = true; // disable sta when starting ap, if sta is not connected ( stability )
|
||||
bool _channelSync = false; // use same wifi sta channel when starting ap
|
||||
|
||||
Reference in New Issue
Block a user