mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-15 23:51:20 +10:00
fix esp32 erase w persistent
This commit is contained in:
+5
-1
@@ -2352,8 +2352,12 @@ bool WiFiManager::WiFi_eraseConfig() {
|
||||
return true;
|
||||
#endif
|
||||
#elif defined(ESP32)
|
||||
bool ret;
|
||||
WiFi.mode(WIFI_AP_STA); // cannot erase if not in STA mode !
|
||||
return WiFi.disconnect(true);
|
||||
WiFi.persistent(true);
|
||||
ret = WiFi.disconnect(true);
|
||||
WiFi.persistent(false);
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -311,6 +311,7 @@ class WiFiManager
|
||||
boolean _disableIpFields = false; // edge case, if true, showxFields(false) forces ip fields off instead of default show when set
|
||||
|
||||
// wrapper functions for handling setting and unsetting persistent for now.
|
||||
bool esp32persistent = false;
|
||||
bool _hasBegun = false;
|
||||
void _begin();
|
||||
void _end();
|
||||
|
||||
Reference in New Issue
Block a user