You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Button states "Pressed" and "Close" are never used or handled. I interested in being able to detect when the button has been pressed and this state is never assigned. The reason I want to detect if the button has been pressed is to start ignoring knob movements. Now it happens that if you accidentally move the knob while pressing, when you release it you end up clicking on something unintended. It could be an optional new feature: click protection. Of course it wouldn't protect against knob movements before the button is pressed.
I tried to modify the code myself but I don't fully understand the state machine logic implemented. By the way, what would be the use of the "Close" state?
Regards.
The text was updated successfully, but these errors were encountered:
I think Held and Released are the closest thing to what you want, There is just a delay until held kicks in so that held/released is not confused with a click or double click. If you use my fork of this lib it has methods to adjust the timing so can adjust the wait time for held and see if that works for you.
However I think an easier implementation would be to save the millis() for each knob change, then have your code ignore clicks if they are within a certain number of millis of the last knob value change. This way there is no need to track presses and releases. Or vice-versa. Save the change in knob value and don't "confirm" the change until enough time passes without a click.
Button states "Pressed" and "Close" are never used or handled. I interested in being able to detect when the button has been pressed and this state is never assigned. The reason I want to detect if the button has been pressed is to start ignoring knob movements. Now it happens that if you accidentally move the knob while pressing, when you release it you end up clicking on something unintended. It could be an optional new feature: click protection. Of course it wouldn't protect against knob movements before the button is pressed.
I tried to modify the code myself but I don't fully understand the state machine logic implemented. By the way, what would be the use of the "Close" state?
Regards.
The text was updated successfully, but these errors were encountered: