Skip to content

Commit 42dba31

Browse files
committed
Fix for wled#3593
1 parent 9e57ef0 commit 42dba31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

usermods/multi_relay/usermod_multi_relay.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,10 +534,10 @@ void MultiRelay::setup() {
534534
* loop() is called continuously. Here you can check for events, read sensors, etc.
535535
*/
536536
void MultiRelay::loop() {
537+
static unsigned long lastUpdate = 0;
537538
yield();
538-
if (!enabled || strip.isUpdating()) return;
539+
if (!enabled || (strip.isUpdating() && millis() - lastUpdate < 100)) return;
539540

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

0 commit comments

Comments
 (0)