setWatch(debounce) can cause multiple of the same event #1902
Comments
I am not sure if this is the right place, I just checked an image made by @fanoush (2v06.100) and I think the edge reporting is now reverced. edge=1 fires when button goes from true to false. |
the build is from commit a4655c3 and the setWatch is on P8 smartwatch button BTN1 which is on normal non-negated pin D17 so there should be no surprises in the setup. |
Thanks - looks like while the edge is reported correctly, the edge triggering code was wrong when debounce was enabled. Should be sorted now |
This is fixed now |
Hopefully, this is the right place to put this. The same line (very similar to the one above), here on a Puck.js in 2v07
For the first trigger, there is no in 2v06
which seems to me that How would it be possible to measure the length of a button press on 2v07? |
Thanks! That's definitely not intentional - I'll look into it. For now you should be able to have:
And measure the time between, but it's not ideal |
Based on:
http://forum.espruino.com/conversations/352012/#comment15451361
Simply doing a setWatch is enough (nRF52):
Hard to reproduce with just a button but rubbing some wires together to generate lots of noise will do it.
Note the times are all far enough apart, it's just that there isn't a falling edge in between
The text was updated successfully, but these errors were encountered: