Skip to content

Commit 4abd53c

Browse files
committed
version 2.0.5 and docu
1 parent cd91898 commit 4abd53c

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file starting 2021.
44

5+
## [2.0.5] - 2023-05-07
6+
7+
* CPP Checks added in Github actions. Thanks to @mkinney
8+
* Debouncing input levels implemented in a central place. Thanks to @IhorNehrutsa
9+
* Docu for using lamda functions as callbacks, Thanks to @gergovari
10+
11+
512
## [2.0.4] - 2022-01-22
613

714
* checked for ESP32 (SimpleOneButton, InterruptOneButton, BlinkMachine)

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ and it will give it back to the lambda.
111111
okBtn.attachClick([](void *ctx){Serial.println(*(((BtnHandler*)(ctx))) -> state}}), this);
112112
```
113113
114+
See also discussion in [Issue #112 ](https://github.com/mathertel/OneButton/issues/112).
115+
114116
115117
## State Events
116118

library.properties

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name=OneButton
2-
version=2.0.4
3-
author=Matthias Hertel, [email protected]
4-
maintainer=Matthias Hertel <http://www.mathertel.de>
2+
version=2.0.5
3+
author=Matthias Hertel
4+
maintainer=Matthias Hertel, https://www.mathertel.de
55
sentence=Arduino library for improving the usage of a singe input button.
66
paragraph=It supports detecting events like single, double, multiple clicks and long-time pressing. This enables you to reuse the same button for multiple functions and lowers the hardware invests.
77
category=Signal Input/Output

src/OneButton.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ void OneButton::tick(bool activeLevel)
244244
_newState(OneButton::OCS_UP);
245245
_startTime = now; // remember starting time
246246

247-
} else if ((activeLevel) && (waitTime > _press_ms)) {
247+
} else if (waitTime > _press_ms) {
248248
if (_longPressStartFunc) _longPressStartFunc();
249249
if (_paramLongPressStartFunc) _paramLongPressStartFunc(_longPressStartFuncParam);
250250
_newState(OneButton::OCS_PRESS);

0 commit comments

Comments
 (0)