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 Djelibeybi committed Jan 15, 2024
1 parent d9b1b4a commit 48aa089
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 48aa089

Please sign in to comment.