Update usermod_PIR_sensor_switch.h - avoid starvation due to strip.isupdating()

Another instance of the "if (strip.isupdating()) return;" problem that we inherited from upstream 🙄
This commit is contained in:
Frank
2025-01-03 17:45:01 +01:00
committed by GitHub
parent 9618d7a531
commit fdc43e0a2b

View File

@@ -294,7 +294,8 @@ public:
void loop() void loop()
{ {
// only check sensors 4x/s // only check sensors 4x/s
if (!enabled || millis() - lastLoop < 250 || strip.isUpdating()) return; if (!enabled || millis() - lastLoop < 250) return;
if (strip.isUpdating() && (millis() - lastLoop < 250)) return; // WLEDMM be nice, but not too nice
lastLoop = millis(); lastLoop = millis();
if (!updatePIRsensorState()) { if (!updatePIRsensorState()) {