File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ EZButton::EZButton(int buttonCount,
66 unsigned int holdInterval)
77{
88 _numButtons = buttonCount;
9- HoldTreshHold = holdTreshold;
9+ HoldThreshHold = holdTreshold;
1010 HoldInterval = holdInterval;
1111 _readButtons = readButtons;
1212 _events = new Event[_numButtons * EVENT_COUNT];
@@ -57,7 +57,7 @@ void EZButton::Loop()
5757 _buttonLastState[i] = 1 ;
5858 CallEvent (i, EventTypes::PRESSED);
5959 }
60- else if (millis () - _buttonDownMillis[i] > HoldTreshHold )
60+ else if (millis () - _buttonDownMillis[i] > HoldThreshHold )
6161 {
6262 unsigned int interval = (millis () - _buttonDownMillis[i]) / HoldInterval;
6363 if (interval > _lastHoldInterval[i])
@@ -73,7 +73,7 @@ void EZButton::Loop()
7373 {
7474 _buttonLastState[i] = 0 ;
7575 _lastHoldInterval[i] = 0 ;
76- if (millis () - _buttonDownMillis[i] > HoldTreshHold )
76+ if (millis () - _buttonDownMillis[i] > HoldThreshHold )
7777 CallEvent (i, EventTypes::HOLD_RELEASED);
7878 else
7979 CallEvent (i, EventTypes::RELEASED);
Original file line number Diff line number Diff line change @@ -15,12 +15,12 @@ enum EventTypes
1515class EZButton
1616{
1717public:
18- unsigned int HoldTreshHold ;
18+ unsigned int HoldThreshHold ;
1919 unsigned int HoldInterval;
2020
2121 EZButton (int buttonCount,
2222 void (*readButtons)(bool *, int ),
23- unsigned int holdTreshold = 500,
23+ unsigned int holdThreshold = 500,
2424 unsigned int holdInterval = 500);
2525
2626 ~EZButton ();
You can’t perform that action at this time.
0 commit comments