mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-15 15:41:21 +10:00
adds erase
This commit is contained in:
+12
-1
@@ -1518,9 +1518,10 @@ void WiFiManager::reportStatus(String &page){
|
||||
*/
|
||||
bool WiFiManager::disconnect(){
|
||||
if(WiFi.status() != WL_CONNECTED){
|
||||
DEBUG_WM("Disconnect: Not connected");
|
||||
DEBUG_WM("Disconnecting: Not connected");
|
||||
return false;
|
||||
}
|
||||
DEBUG_WM("Disconnecting");
|
||||
return WiFi_Disconnect();
|
||||
}
|
||||
|
||||
@@ -1529,9 +1530,19 @@ bool WiFiManager::disconnect(){
|
||||
* @access public
|
||||
*/
|
||||
void WiFiManager::reboot(){
|
||||
DEBUG_WM("Restarting");
|
||||
ESP.restart();
|
||||
}
|
||||
|
||||
/**
|
||||
* reboot the device
|
||||
* @access public
|
||||
*/
|
||||
bool WiFiManager::erase(){
|
||||
DEBUG_WM("Erasing");
|
||||
return WiFi_eraseConfig();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [resetSettings description]
|
||||
|
||||
Reference in New Issue
Block a user