Merge branch 'development' of https://github.com/tzapu/WiFiManager into development

This commit is contained in:
Shawn A
2018-03-28 08:14:10 -05:00
2 changed files with 23 additions and 1 deletions
+20 -1
View File
@@ -259,6 +259,12 @@ boolean WiFiManager::autoConnect(char const *apName, char const *apPassword) {
}
return true;
}
// possibly skip the config portal
if (!_enableConfigPortal) {
return false;
}
// not connected start configportal
return startConfigPortal(apName, apPassword);
}
@@ -1934,6 +1940,19 @@ void WiFiManager::setScanDispPerc(boolean enabled){
_scanDispOptions = enabled;
}
/**
* toggle configportal if autoconnect failed
* if enabled, then the configportal will be activated on autoconnect failure
* @since $dev
* @access public
* @param boolean enabled [true]
*/
void WiFiManager::setEnableConfigPortal(boolean enable)
{
_enableConfigPortal = enable;
}
/**
* set the hostname (dhcp client id)
* @since $dev
@@ -2321,4 +2340,4 @@ void WiFiManager::WiFi_autoReconnect(){
WiFi.onEvent(WiFiEvent);
}
#endif
}
}