Skip to content

Commit

Permalink
Update OneButton.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaggyDog18 authored Jul 9, 2020
1 parent db1e21e commit fc29eda
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/OneButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,16 @@ void OneButton::attachDoubleClick(parameterizedCallbackFunction newFunction, voi
#endif


// ShaggyDog ---- Tripple and Multiple Clicks ----
// save function for trippleClick event
void OneButton::attachTrippleClick(callbackFunction newFunction) {
_trippleClickFunc = newFunction;
// ShaggyDog ---- Triple and Multiple Clicks ----
// save function for tripleClick event
void OneButton::attachTripleClick(callbackFunction newFunction) {
_tripleClickFunc = newFunction;
} // attachTrippleClick
#ifdef PARAM_FUNC
// save function for parameterized doubleClick event
void OneButton::attachTrippleClick(parameterizedCallbackFunction newFunction, void* parameter) {
_paramTrippleClickFunc = newFunction;
_trippleClickFuncParam = parameter;
void OneButton::attachTripleClick(parameterizedCallbackFunction newFunction, void* parameter) {
_paramTripleClickFunc = newFunction;
_tripleClickFuncParam = parameter;
} // attachTrippleClick
#endif
// ShaggyDog ---- Tripple and Multiple Clicks ----
Expand Down Expand Up @@ -270,9 +270,9 @@ void OneButton::tick(bool buttonIsPressed) {
#endif
break;
default: // number of clicks > 2
if (_trippleClickFunc ) _trippleClickFunc();
if (_tripleClickFunc ) _tripleClickFunc();
#ifdef PARAM_FUNC
if (_paramTrippleClickFunc) _paramTrippleClickFunc(_trippleClickFuncParam);
if (_paramTripleClickFunc) _paramTripleClickFunc(_tripleClickFuncParam);
#endif
} // switch() number of clicks
_state = WAIT_FOR_INITIAL_PRESS; // restart.
Expand Down

0 comments on commit fc29eda

Please sign in to comment.