Skip to content

Commit

Permalink
Fix for Aircoookie#3593
Browse files Browse the repository at this point in the history
  • Loading branch information
blazoncek authored and softhack007 committed Dec 17, 2023
1 parent cf20c80 commit cf2f378
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usermods/multi_relay/usermod_multi_relay.h
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,10 @@ void MultiRelay::setup() {
* loop() is called continuously. Here you can check for events, read sensors, etc.
*/
void MultiRelay::loop() {
static unsigned long lastUpdate = 0;
yield();
if (!enabled || strip.isUpdating()) return;
if (!enabled || (strip.isUpdating() && millis() - lastUpdate < 100)) return;

static unsigned long lastUpdate = 0;
if (millis() - lastUpdate < 100) return; // update only 10 times/s
lastUpdate = millis();

Expand Down

0 comments on commit cf2f378

Please sign in to comment.