remove workardound for arduino 2.0.5 #1482

This commit is contained in:
tablatronix
2022-09-20 19:37:26 -05:00
parent ac2cd86f21
commit d5536fbc69
2 changed files with 8 additions and 1 deletions
+3 -1
View File
@@ -717,7 +717,9 @@ boolean WiFiManager::startConfigPortal(char const *apName, char const *apPasswo
// HANDLE issues with STA connections, shutdown sta if not connected, or else this will hang channel scanning and softap will not respond
if(_disableSTA || (!WiFi.isConnected() && _disableSTAConn)){
// this fixes most ap problems, however, simply doing mode(WIFI_AP) does not work if sta connection is hanging, must `wifi_station_disconnect`
WiFi.mode(WIFI_AP_STA);
#ifdef WM_DISCONWORKAROUND
WiFi.mode(WIFI_AP_STA);
#endif
WiFi_Disconnect();
WiFi_enableSTA(false);
#ifdef WM_DEBUG_LEVEL
+5
View File
@@ -659,6 +659,7 @@ class WiFiManager
#if defined(ESP_ARDUINO_VERSION) && defined(ESP_ARDUINO_VERSION_VAL)
#define WM_ARDUINOVERCHECK ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0)
#define WM_ARDUINOVERCHECK_204 ESP_ARDUINO_VERSION <= ESP_ARDUINO_VERSION_VAL(2, 0, 5)
#ifdef WM_ARDUINOVERCHECK
#define WM_ARDUINOEVENTS
@@ -667,6 +668,10 @@ class WiFiManager
#define WM_NOCOUNTRY
#endif
#ifdef WM_ARDUINOVERCHECK_204
#define WM_DISCONWORKAROUND
#endif
#else
#define WM_NOCOUNTRY
#endif