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

Button debounce is hardcoded to 7ms #1809

Open
ChristophLabacher opened this issue Feb 11, 2023 · 1 comment
Open

Button debounce is hardcoded to 7ms #1809

ChristophLabacher opened this issue Feb 11, 2023 · 1 comment

Comments

@ChristophLabacher
Copy link
Contributor

ChristophLabacher commented Feb 11, 2023

According to the docs, a button can be initialized with a debounce parameter. However, in the code for the Button class, this value is never read and the debounce time is hardcoded to 7ms: https://github.com/rwaldron/johnny-five/blob/main/lib/button.js#L190

Am I right in assuming the parameter should be used here? If yes, I’m happy to submit a PR.

@dtex
Copy link
Collaborator

dtex commented Feb 11, 2023

That's my fault. PR #1690 was submitted, and I updated the docs, but the PR was never merged because tests were failing. It's a good change, so I'll see if I can't get the test to pass rather than change the docs back.

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

No branches or pull requests

2 participants