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 12be5f5 commit c847f8eCopy full SHA for c847f8e
button_abs.h
@@ -21,6 +21,9 @@ int encoderLast = -1; // prev value
21
bool encoderHasChange = false; // flag enc change
22
bool useInt = false; // use interrupts, via interruptPin
23
24
+long int encoderLastChange = 0; // timestamp of last encoder change
25
+int encoderThrottleDuration = 500; // how long to defer loop for encoder waits
26
+
27
bool encoderHasPress = false;
28
bool encoderHasHold = false;
29
bool debug_enc = false;
@@ -31,6 +34,7 @@ void encoderClear(){
31
34
encoderHasPress = false;
32
35
encoderHasHold = false;
33
36
encoderHasChange = false;
37
+ encoderLastChange = millis();
38
}
39
40
void IRAM_ATTR onEncoderChange(int newValue) {
0 commit comments