Skip to content

Commit

Permalink
Update OneButton.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
IhorNehrutsa committed May 8, 2023
1 parent 7b73194 commit 12538ad
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/OneButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ void OneButton::_fsm(bool activeLevel)
case OneButton::OCS_UP:
// level is inactive

// count as a short button down
_nClicks++;
_newState(OneButton::OCS_COUNT);
// count as a short button down
_nClicks++;
_newState(OneButton::OCS_COUNT);
break;

case OneButton::OCS_COUNT:
Expand Down Expand Up @@ -320,9 +320,9 @@ void OneButton::_fsm(bool activeLevel)
case OneButton::OCS_PRESSEND:
// button was released.

if (_longPressStopFunc) _longPressStopFunc();
if (_paramLongPressStopFunc) _paramLongPressStopFunc(_longPressStopFuncParam);
reset();
if (_longPressStopFunc) _longPressStopFunc();
if (_paramLongPressStopFunc) _paramLongPressStopFunc(_longPressStopFuncParam);
reset();
break;

default:
Expand Down

0 comments on commit 12538ad

Please sign in to comment.