the 'eb.clear()' does not really set the encoder counter to 0
TS32 opened this issue · 1 comments
TS32 commented
Thanks for your great work and it's a useful and elegant lib which saved me quite a lot of time.
With the EncButton, I found there is no way to clear the counter. eg, I turn to a position and need to tell the program the current position is '0', so I can double click the button to trigger that, however the 'eb.clear()' does not really set the encoder counter to 0. could you help?
GyverLibs commented
Hi, counter
is a public class variable, you can do whatever you want with it:
eb.counter = 0;
eb.counter += 100;
Serial.println(eb.counter);
And eb.clear()
clears only event flags for non standard library using