Fix setting Wifi mode (#6875)

Fix setting Wifi mode (#6875)
This commit is contained in:
Theo Arends 2019-11-09 14:26:17 +01:00
parent 5ebf04f047
commit 9ada3df640
1 changed files with 4 additions and 0 deletions

View File

@ -118,6 +118,10 @@ void WifiSetMode(WiFiMode_t wifi_mode)
delay(100); delay(100);
} }
if (!WiFi.mode(wifi_mode)) {
AddLog_P(LOG_LEVEL_DEBUG, PSTR(D_LOG_WIFI "Cannot set Mode"));
}
if (wifi_mode == WIFI_OFF) { if (wifi_mode == WIFI_OFF) {
delay(1000); delay(1000);
WiFi.forceSleepBegin(); WiFi.forceSleepBegin();