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:
@@ -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()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user