-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting the attachDuringLongPress event interval #88
Comments
have you find it??? if yes then kindly guide me if i can set the interval and duration of attachDuringLongPress event ?? |
#124 |
fixed by #124 |
mathertel
added a commit
that referenced
this issue
Jun 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it possible to set the interval for the attachDuringLongPress event?
I use two buttons to increase or decrease a number on a display.
I use the same function for attachClick and attachDuringLongPress so one can increase/decrease with one digit or 'speed' true the setting by holding down the button.
The 'speed' however is way to fast.
What I do now is testing at the end of the function whether the button is in a isLongPressed()) state and delay a period:
if (btnIncrease.isLongPressed()){
delay(50);}
This works quite well, but I have a aversion for delay().
I was thinking of a function setLongPressInterval(int) (likewise setPressTicks(int)) to set the interval.
Keep up the good work!
The text was updated successfully, but these errors were encountered: