Skip to content

Commit

Permalink
Fix for #3593
Browse files Browse the repository at this point in the history
  • Loading branch information
blazoncek committed Dec 17, 2023
1 parent da488f7 commit 5c90a74
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 @@ -512,10 +512,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 5c90a74

Please sign in to comment.