#72 lost wifi config

This commit is contained in:
Magnus Persson 2022-05-04 16:31:02 +02:00
parent ced4c9f8fc
commit 403ed1d350

View File

@ -279,6 +279,8 @@ bool WifiConnection::connect() {
if (!waitForConnection(timeout)) {
Log.warning(F("WIFI: Failed to connect to first SSID %s." CR),
myConfig.getWifiSSID(0));
if (strlen(myConfig.getWifiSSID(1))) {
connectAsync(1);
if (waitForConnection(timeout)) {
@ -290,6 +292,7 @@ bool WifiConnection::connect() {
myConfig.saveFile();
return true;
}
}
Log.warning(F("WIFI: Failed to connect to any SSID." CR));
return false;