diff --git a/src/OneButton.cpp b/src/OneButton.cpp index 429da21..4a05fc3 100644 --- a/src/OneButton.cpp +++ b/src/OneButton.cpp @@ -257,7 +257,7 @@ void OneButton::_fsm(bool activeLevel) _newState(OneButton::OCS_UP); _startTime = now; // remember starting time - } else if ((activeLevel) && (waitTime > _press_ms)) { + } else if (waitTime > _press_ms) { if (_longPressStartFunc) _longPressStartFunc(); if (_paramLongPressStartFunc) _paramLongPressStartFunc(_longPressStartFuncParam); _newState(OneButton::OCS_PRESS); diff --git a/src/OneButton.h b/src/OneButton.h index 49f6535..6390ba2 100644 --- a/src/OneButton.h +++ b/src/OneButton.h @@ -137,7 +137,7 @@ class OneButton * level is given by the parameter. * Run the finite state machine (FSM) using the given level. */ - void tick(bool level); + void tick(bool activeLevel); /**