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

Fix #91 and #88 #124

Merged
merged 8 commits into from
Jun 3, 2023
Merged

Fix #91 and #88 #124

merged 8 commits into from
Jun 3, 2023

Conversation

IhorNehrutsa
Copy link
Contributor

Add getPressedMs() function.

Add LongPressEvents.ino example.

OneButton Example.
Please press and hold the button for a few seconds.
810	 - LongPressStart()
820	 - DuringLongPress()
1820	 - DuringLongPress()
2820	 - DuringLongPress()
3820	 - DuringLongPress()
4820	 - DuringLongPress()
5820	 - DuringLongPress()
6550	 - LongPressStop()

In the first column, milliseconds from the start of pressing the button.

@IhorNehrutsa IhorNehrutsa mentioned this pull request May 11, 2023
Set interval in msecs between calls of the DuringLongPress event.
src/OneButton.h Outdated
int _nClicks = 0; // count the number of clicks with this variable
int _maxClicks = 1; // max number (1, 2, multi=3) of clicks of interest by registration of event functions.

unsigned int _long_press_intrval_ms = 0; // interval in msecs between calls of the DuringLongPress event
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the typo: _long_press_intrval_ms => _long_press_interval_ms

@mathertel
Copy link
Owner

Thanks a lot for the contribution. This is welcome.

Please fix the typo: _long_press_intrval_ms => _long_press_interval_ms.
Please add some instructive comments at the begin of the new example.

@mathertel mathertel merged commit ff7627d into mathertel:master Jun 3, 2023
4 checks passed
@mathertel
Copy link
Owner

Thanks a lot !

@IhorNehrutsa
Copy link
Contributor Author

Please bump the version and library.json
Thanks

@IhorNehrutsa IhorNehrutsa deleted the fix_91 branch June 5, 2023 05:14
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 this pull request may close these issues.

None yet

2 participants