Skip to content

Commit bc16ed4

Browse files
committed
fixed typo
1 parent a6c8327 commit bc16ed4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/EZButton.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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);

src/EZButton.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ enum EventTypes
1515
class EZButton
1616
{
1717
public:
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();

0 commit comments

Comments
 (0)