Skip to content

Commit

Permalink
cpp check false positive reworked
Browse files Browse the repository at this point in the history
  • Loading branch information
mathertel committed May 7, 2023
1 parent 4abd53c commit 48fb904
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OneButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ void OneButton::tick(bool activeLevel)
_newState(OneButton::OCS_UP);
_startTime = now; // remember starting time

} else if (waitTime > _press_ms) {
} else if ((activeLevel) && (waitTime > _press_ms)) {
if (_longPressStartFunc) _longPressStartFunc();
if (_paramLongPressStartFunc) _paramLongPressStartFunc(_longPressStartFuncParam);
_newState(OneButton::OCS_PRESS);
Expand Down

0 comments on commit 48fb904

Please sign in to comment.