-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Hello, looks like it's possible to softlock button in read() method.
If button changes at time:
millis_max_value - _delay - some_small_value
and doesn't change state back until millis() overflow, then _ignore_until will be almost always bigger then millis().
For an example: if button has been unpressed at millis_max_value - _delay, then state will be saved us unpressed, _ignore_until will be millis_max_value. And right after millis overflow, condition:
if (_ignore_until > millis()) { // ignore any changes during this period }
almost always will be true, and it will lock execution of next condition.
And the only possible exit, except reset, will be holding button down around overflow, hoping not to miss it =)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels