From 48aa089f23701e71898bc13eb343ac272d02c66d Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sun, 17 Dec 2023 22:15:28 +0100 Subject: [PATCH] Fix for #3593 --- usermods/multi_relay/usermod_multi_relay.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usermods/multi_relay/usermod_multi_relay.h b/usermods/multi_relay/usermod_multi_relay.h index 8f0bf3837b..cf0aca2271 100644 --- a/usermods/multi_relay/usermod_multi_relay.h +++ b/usermods/multi_relay/usermod_multi_relay.h @@ -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();