Skip to content
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

Fast GPIO button clicks go undetected #713

Closed
miotislucifugis opened this issue Sep 1, 2024 · 5 comments
Closed

Fast GPIO button clicks go undetected #713

miotislucifugis opened this issue Sep 1, 2024 · 5 comments

Comments

@miotislucifugis
Copy link

miotislucifugis commented Sep 1, 2024

Ive recently completed a minidexed build that uses mechanical keyboard switches for GPIO buttons and Im finding that with these switches which allow for faster click action (vs the standard tiny pcb tactile switch) , many times the quick taps go undetected and it requires sort of a longer deliberate press to be recognized. I assume that this is due to a switch debounce delay in software. Is there any way to customize this? ... or can it be added as a custom setting, like the double click and longpress timeouts?

@probonopd
Copy link
Owner

probonopd commented Sep 1, 2024

Possibly we should lower BUTTONS_UPDATE_NUM_TICKS and/or DEBOUNCE_TIME in https://github.com/probonopd/MiniDexed/blob/main/src/uibuttons.h.

probonopd added a commit that referenced this issue Sep 1, 2024
@probonopd
Copy link
Owner

Please test the build from #714 - does it improve/solve the issue?

@diyelectromusic
Copy link
Contributor

If the issue is detecting short presses in the first place, rather than repeated presses, then it is probably BUTTONS_UPDATE_NUM_TICKS that needs decreasing. This would however mean that more time is spent checking buttons rather than processing audio, so we'd need to check performance on lower-end devices too to ensure audio is still ok.

DEBOUNCE_TIME I'd expect would affect how quickly a second press of the button is recognised, e.g. in a double click.

I don't recall how we came up with those numbers - I expect it was an "initial finger in the air" guess and then see how it works :)

Kevin

@miotislucifugis
Copy link
Author

miotislucifugis commented Sep 1, 2024

(copied from my response in #714) Wow, Thanks! This seems to be working great. Even the fastest, lightest taps get registered. However, Im finding that if i do a couple of fast successive taps, like 3 quick ones in a row to go back 3 steps, only only one press gets identified....but I guess that this is a limit of the double tap timeout.

Actually I just tested again and the back button is good, it was the performance up and down that took a moment to change between taps, but i guess a 1/3 second is to be expected because it is loading a whole performance.

menu navigation is super fast. This build definitely solves my issue

probonopd added a commit that referenced this issue Sep 8, 2024
@miotislucifugis
Copy link
Author

miotislucifugis commented Sep 15, 2024

Im closing this. Everything is working fine now w/ the latest release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants