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

Add parameterized callbacks #49

Merged
merged 1 commit into from
Dec 4, 2019
Merged

Conversation

nielsvandepas
Copy link
Contributor

Added methods and fields that make OneButton more usable in the context of classes and OOP. Every event now has an additional attach method which allows to pass one void*-type parameter. That parameter can be used to pass an instance of a class.

@eried
Copy link

eried commented Oct 31, 2019

Yes! please

@th0m4sek
Copy link

Could be in next release?

@redhog
Copy link

redhog commented Nov 13, 2019

Merging this would remove a horrible preprocessor hack in TTyGO :)

@mathertel
Copy link
Owner

This looks good. I will test in the next days.

@mathertel mathertel added the enhancement adds additional functionality label Nov 13, 2019
@mathertel mathertel merged commit a52bfa0 into mathertel:master Dec 4, 2019
@mathertel
Copy link
Owner

Thank you for your enhancement. It is not exactly the C++ style but helps a lot.

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

Successfully merging this pull request may close these issues.

5 participants