From e1011d3cdd8ac55e556169482dd2c82c24b00e12 Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Sat, 28 Apr 2018 11:17:16 +0200 Subject: [PATCH] Disable sleep on core 2.4.1 5.12.0m * Disable sleep when using Esp/Arduino core 2.4.1 (#2559) --- sonoff/_releasenotes.ino | 1 + sonoff/support.ino | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sonoff/_releasenotes.ino b/sonoff/_releasenotes.ino index 4be23c8d7..725ce14e3 100644 --- a/sonoff/_releasenotes.ino +++ b/sonoff/_releasenotes.ino @@ -1,6 +1,7 @@ /* 5.12.0m * Reinit timers to accomodate random window (#2447) * Remove sonoff-xxl + * Disable sleep when using Esp/Arduino core 2.4.1 (#2559) * Add sonoff-classic, sonoff-allsensors and sonoff-knx * Add some coloring to important web buttons * Add rule variables and teleperiod trigger to accomodate user HA messages diff --git a/sonoff/support.ino b/sonoff/support.ino index 8bc76d6a8..37e2139bb 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -615,7 +615,9 @@ void WifiBegin(uint8_t flag) delay(200); WiFi.mode(WIFI_STA); // Disable AP mode if (Settings.sleep) { +#ifndef ARDUINO_ESP8266_RELEASE_2_4_1 // See https://github.com/arendst/Sonoff-Tasmota/issues/2559 WiFi.setSleepMode(WIFI_LIGHT_SLEEP); // Allow light sleep during idle times +#endif } // if (WiFi.getPhyMode() != WIFI_PHY_MODE_11N) { // WiFi.setPhyMode(WIFI_PHY_MODE_11N);