We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be45c44 commit 30c2df1Copy full SHA for 30c2df1
src/EasyButton.cpp
@@ -131,7 +131,7 @@ bool EasyButton::read() {
131
_held_callback_called = false;
132
}
133
// button is not released.
134
- else if (_current_state && _time - _last_change >= _held_threshold && mPressedForCallback) {
+ else if (_current_state && read_started_ms - _last_change >= _held_threshold && mPressedForCallback) {
135
// button has been pressed for at least the given time
136
_was_btn_held = true;
137
// reset short presses counters.
@@ -147,4 +147,4 @@ bool EasyButton::read() {
147
_time = read_started_ms;
148
149
return _current_state;
150
-}
+}
0 commit comments