this is a hotfix, there are numerous issues with this, development branch already addressed all of them.
This commit is contained in:
tablatronix
2018-04-09 19:16:12 -05:00
parent 0749e1bdd7
commit d27fa7df61
+14 -3
View File
@@ -197,9 +197,20 @@ boolean WiFiManager::startConfigPortal() {
}
boolean WiFiManager::startConfigPortal(char const *apName, char const *apPassword) {
//setup AP
WiFi.mode(WIFI_AP_STA);
DEBUG_WM(F("SET AP STA"));
if(!WiFi.isConnected()){
WiFi.persistent(false);
// disconnect sta, start ap
WiFi.disconnect(); // this alone is not enough to stop the autoconnecter
WiFi.mode(WIFI_AP);
WiFi.persistent(true);
}
else {
//setup AP
WiFi.mode(WIFI_AP_STA);
DEBUG_WM(F("SET AP STA"));
}
_apName = apName;
_apPassword = apPassword;