adds disconnect method for users

non persistent disconnect
This commit is contained in:
Shawn A
2018-02-14 10:50:57 -06:00
parent e342fd9b71
commit 3d3518a10a
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -1374,6 +1374,10 @@ bool WiFiManager::WiFi_Mode(WiFiMode_t m) {
return WiFi_Mode(m,false);
}
bool WiFiManager::disconnect(){
return WiFi_Disconnect();
}
// sta disconnect without persistent
bool WiFiManager::WiFi_Disconnect() {
if((WiFi.getMode() & WIFI_STA) != 0) {
+1
View File
@@ -95,6 +95,7 @@ class WiFiManager
void resetSettings();
void reboot();
boolean disconnect(); // non persistent disconnect
//sets timeout before AP,webserver loop ends and exits even if there has been no setup.
//useful for devices that failed to connect at some point and got stuck in a webserver loop