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

tolerance should be a constant #4

Open
s-celles opened this issue Dec 28, 2021 · 5 comments · May be fixed by #6
Open

tolerance should be a constant #4

s-celles opened this issue Dec 28, 2021 · 5 comments · May be fixed by #6

Comments

@s-celles
Copy link

Hello,

Maybe tolerance should be defined as a constant (instead of having 100 in code).
But I'm not sure if it should be set using macro #define https://www.arduino.cc/reference/en/language/structure/further-syntax/define/ or using const keyword https://www.arduino.cc/reference/en/language/variables/variable-scope-qualifiers/const/

Kind regards

@ArduinoGetStarted
Copy link
Owner

Dear @scls19fr ,
I am sorry for the late reply.
Your suggestion is great and we will update it in the next release.

Thank you!
Best regards,

@s-celles
Copy link
Author

It could be even better to make tolerance a variable which could be given when constructing ezAnalogKeypad

@s-celles s-celles linked a pull request Feb 11, 2022 that will close this issue
@s-celles
Copy link
Author

PR #6 sent but untested

@ArduinoGetStarted
Copy link
Owner

Dear @scls19fr
From algorithm, tolerance is NOT necessary to be a parameter. It just need to be a constant. I will add it in the next release.
Thank you very much for your suggestion.

@s-celles
Copy link
Author

I think that depending the number of buttons tolerance should be greater or smaller

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

Successfully merging a pull request may close this issue.

2 participants