From fa4326b6b0eac4a119577f5d2bb1c0d0af147c98 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 13 Jan 2021 16:57:04 +0100 Subject: [PATCH] Fix ESP32 compilation --- tasmota/support_wifi.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasmota/support_wifi.ino b/tasmota/support_wifi.ino index 95380cd74..b281b0c51 100644 --- a/tasmota/support_wifi.ino +++ b/tasmota/support_wifi.ino @@ -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) } }