disabled second check for strip.isUpdating()
commented out the second `strip.isUpdating()` check, because it should not be neccesary; Strip.service() is called after handleIO()/handleButton().
This commit is contained in:
parent
860e74bffa
commit
c79eb43347
@ -159,12 +159,13 @@ void handleAnalog(uint8_t b)
|
|||||||
// remove noise & reduce frequency of UI updates
|
// remove noise & reduce frequency of UI updates
|
||||||
if (abs(int(aRead) - int(oldRead[b])) <= POT_SENSITIVITY) return; // no significant change in reading
|
if (abs(int(aRead) - int(oldRead[b])) <= POT_SENSITIVITY) return; // no significant change in reading
|
||||||
|
|
||||||
// wait until strip finishes updating (why: strip was not updating at the start of handleButton() but may have started during analogRead()?)
|
// Unomment the next lines if you still see flickering related to potentiometer
|
||||||
unsigned long wait_started = millis();
|
// This waits until strip finishes updating (why: strip was not updating at the start of handleButton() but may have started during analogRead()?)
|
||||||
while(strip.isUpdating() && (millis() - wait_started < STRIP_WAIT_TIME)) {
|
//unsigned long wait_started = millis();
|
||||||
delay(1);
|
//while(strip.isUpdating() && (millis() - wait_started < STRIP_WAIT_TIME)) {
|
||||||
}
|
// delay(1);
|
||||||
if (strip.isUpdating()) return; // give up
|
//}
|
||||||
|
//if (strip.isUpdating()) return; // give up
|
||||||
|
|
||||||
oldRead[b] = aRead;
|
oldRead[b] = aRead;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user