Skip to content

Commit 914f1bc

Browse files
authored
Merge pull request #9 from IPdotSetAF/8-typo-in-property-name
fixed typos
2 parents 582bedf + 5808f86 commit 914f1bc

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Subscribe to Pressed/Released/Hold/HoldReleased events with as many buttons as y
3535
- Hold Released
3636
- Unlimited Buttons/Touches: You can configure as many buttons as you need.
3737
- Customizability: You can change any of the time thresholds to customize your user experience.
38-
- `HoldTreshHold`: The time it takes before the first `HOLD` event is executed after the button is held down.
38+
- `HoldThreshold`: The time it takes before the first `HOLD` event is executed after the button is held down.
3939
- `HoldInterval`: The Time Interval that corresponds to the `HOLD` event being executed repeatedly after the first `HOLD` event was registered.
4040
- Debugging: Easily enable/disable debugging for all button states and events.
4141
- Blackout Time: Disable any event execution for any amount of time.
@@ -66,7 +66,7 @@ This Library is available in `Arduino Library Repository` and `PIO` and you can
6666
#define BTN_4 3
6767
//config for 4 buttons
6868
//Read button states from the 'ReadButtons' function
69-
//HoldTreshHold: 500ms
69+
//HoldThreshold: 500ms
7070
//HoldInterval: 300ms
7171
EZButton _ezb(4, ReadButtons, 500, 300);
7272
```

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "EZButton",
33
"version": "2.3.1",
4-
"description": "Transform raw button/touch inputs into events easily. Subscibe to Pressed/Released/Hold/HoldReleased events of as many buttons as you want. Customize time tresholds. Works with any button read method.",
4+
"description": "Transform raw button/touch inputs into events easily. Subscibe to Pressed/Released/Hold/HoldReleased events of as many buttons as you want. Customize time thresholds. Works with any button read method.",
55
"keywords":
66
[
77
"Button",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version=2.3.1
33
author=Mohammad Mahdi Nazari <[email protected]>
44
maintainer=Mohammad Mahdi Nazari <[email protected]>
55
sentence=Transform raw button/touch inputs into events easily.
6-
paragraph=Subscibe to Pressed/Released/Hold/HoldReleased events of as many buttons as you want. Customize time tresholds. Works with any button read method.
6+
paragraph=Subscibe to Pressed/Released/Hold/HoldReleased events of as many buttons as you want. Customize time thresholds. Works with any button read method.
77
category=Signal Input/Output
88
url=https://github.com/IPdotSetAF/EZButton
99
architectures=*

src/EZButton.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
EZButton::EZButton(int buttonCount,
44
void (*readButtons)(bool *, int),
5-
unsigned int holdTreshold,
5+
unsigned int holdThreshold,
66
unsigned int holdInterval)
77
{
88
_numButtons = buttonCount;
9-
HoldThreshHold = holdTreshold;
9+
HoldThreshold = holdThreshold;
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] > HoldThreshHold)
60+
else if (millis() - _buttonDownMillis[i] > HoldThreshold)
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] > HoldThreshHold)
76+
if (millis() - _buttonDownMillis[i] > HoldThreshold)
7777
CallEvent(i, EventTypes::HOLD_RELEASED);
7878
else
7979
CallEvent(i, EventTypes::RELEASED);

src/EZButton.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ enum EventTypes
1515
class EZButton
1616
{
1717
public:
18-
unsigned int HoldThreshHold;
18+
unsigned int HoldThreshold;
1919
unsigned int HoldInterval;
2020

2121
EZButton(int buttonCount,

0 commit comments

Comments
 (0)