Skip to content

Commit

Permalink
ESP8266: Allow auto modem sleep if power off and sleep permitted (wle…
Browse files Browse the repository at this point in the history
…d#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 <cschwinne@gmail.com>
  • Loading branch information
pfeerick and Aircoookie authored Sep 20, 2020
1 parent edbe813 commit 1313a44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wled00/wled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1313a44

Please sign in to comment.