pull/3529/head
Blaz Kristan 2023-12-17 22:15:28 +01:00
rodzic da488f76d2
commit 5c90a742ba
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -512,10 +512,10 @@ void MultiRelay::setup() {
* loop() is called continuously. Here you can check for events, read sensors, etc. * loop() is called continuously. Here you can check for events, read sensors, etc.
*/ */
void MultiRelay::loop() { void MultiRelay::loop() {
yield();
if (!enabled || strip.isUpdating()) return;
static unsigned long lastUpdate = 0; static unsigned long lastUpdate = 0;
yield();
if (!enabled || (strip.isUpdating() && millis() - lastUpdate < 100)) return;
if (millis() - lastUpdate < 100) return; // update only 10 times/s if (millis() - lastUpdate < 100) return; // update only 10 times/s
lastUpdate = millis(); lastUpdate = millis();