Update support_wifi.ino

This commit is contained in:
Theo Arends 2019-12-02 11:56:40 +01:00
parent 07807fc799
commit 8c3295034d

View File

@ -118,8 +118,10 @@ void WifiSetMode(WiFiMode_t wifi_mode)
delay(100);
}
if (!WiFi.mode(wifi_mode)) {
AddLog_P(LOG_LEVEL_DEBUG, PSTR(D_LOG_WIFI "Cannot set Mode"));
uint32_t retry = 2;
while (!WiFi.mode(wifi_mode) && retry--) {
AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR("Retry set Mode..."));
delay(100);
}
if (wifi_mode == WIFI_OFF) {