From 3d3518a10a63eaf4ddae764ed41286085477d1d0 Mon Sep 17 00:00:00 2001 From: Shawn A Date: Wed, 14 Feb 2018 10:50:57 -0600 Subject: [PATCH] adds disconnect method for users non persistent disconnect --- WiFiManager.cpp | 4 ++++ WiFiManager.h | 1 + 2 files changed, 5 insertions(+) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index e4d7db2..d46fd44 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -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) { diff --git a/WiFiManager.h b/WiFiManager.h index f39f8fa..ede7d87 100644 --- a/WiFiManager.h +++ b/WiFiManager.h @@ -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