We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20186f0 commit 33a6829Copy full SHA for 33a6829
include/EZButton.h
@@ -24,6 +24,7 @@ class EZButton
24
25
~EZButton();
26
27
+ void Reset();
28
void CheckButtons();
29
void Subscribe(String buttonName, void (*event)(), EventTypes type);
30
src/EZButton.cpp
@@ -43,6 +43,15 @@ EZButton::~EZButton()
43
delete[] _onHoldReleaseEvents;
44
}
45
46
+void EZButton::Reset(){
47
+ for (int i = 0; i < _numButtons; i++)
48
+ {
49
+ _buttonDownMillis[i] = 0;
50
+ _buttonLastState[i] = false;
51
+ _lastHoldInterval[i] = 0;
52
+ }
53
+}
54
+
55
void EZButton::CheckButtons()
56
{
57
bool *buttonStates = _readButtons(_buttons, _numButtons);
0 commit comments