Fix ESP32 compilation

This commit is contained in:
Theo Arends 2021-01-13 16:57:04 +01:00
parent 40007bbae9
commit fa4326b6b0
1 changed files with 4 additions and 1 deletions

View File

@ -163,9 +163,12 @@ void WiFiSetSleepMode(void)
if (TasmotaGlobal.sleep && Settings.flag3.sleep_normal) { // SetOption60 - Enable normal sleep instead of dynamic sleep
WiFi.setSleepMode(WIFI_LIGHT_SLEEP); // Allow light sleep during idle times
} else {
#ifdef ESP8266
if (0 == TasmotaGlobal.sleep) {
WiFi.setSleepMode(WIFI_NONE_SLEEP); // Disable sleep
} else {
} else
#endif
{
WiFi.setSleepMode(WIFI_MODEM_SLEEP); // Sleep (Esp8288/Arduino core and sdk default)
}
}