From 1313a44ba373c6621809e825358d9dee7d5ca89d Mon Sep 17 00:00:00 2001 From: Peter Date: Mon, 21 Sep 2020 00:00:24 +1000 Subject: [PATCH] ESP8266: Allow auto modem sleep if power off and sleep permitted (#1184) * Allow modem sleep if power off and sleep permitted * Only add auto modem sleep handling for ESP8266 * Add comment and remove redundant condition Co-authored-by: Aircoookie --- wled00/wled.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wled00/wled.cpp b/wled00/wled.cpp index 4de4f865..7534d25d 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -84,10 +84,14 @@ void WLED::loop() handleHue(); handleBlynk(); - yield(); + if (!offMode) strip.service(); +#ifdef ESP8266 + else if (!noWifiSleep) + delay(1); //required to make sure ESP enters modem sleep (see #1184) +#endif } yield(); #ifdef ESP8266