Replies: 1 comment
-
I have had some troubles to understand this as well, but the counter is updated with the line of code The main problem why it isn't working seems to be that the counter is not reacting to the loop at all. See #816 . I have adjusted the code as describe in the issue and it seems to work now. Maybe you could give it a try as well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need some help to understand how the class DigitalInputDebounceCounter works.
https://signalk.org/SensESP/generated/docs/classsensesp_1_1_digital_input_debounce_counter.html
I use it to count the windlass revolutions with a magnetic sensor. I first tried DigitalInputCounter (without Debounce) and as expected, it counts several times the same event.
BUT when I switched to DigitalInputDebounceCounter, it doesn't work at all, even if the ignore_interval_ms_ value is set to 1 ms.
I can't figure out where the value since_last_event is updated in digital_input.cpp :
I tried to find all references (from Visual Studio Code) to this variable and it didn't find any one. The value since_last_event is never set or updated, so the condition in handleInterrupt() could never be true.
Is this a bug ?
Edit: I'm using SensESP v3.0.0beta2
Beta Was this translation helpful? Give feedback.
All reactions