mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-15 07:31:21 +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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user