Oh, one thing that I know is definitely not correct in my code (but not fatally) is the fact that even the long-presses of the button set off the short-press function. I figure that, as written, the short-press watch is watching for presses of at least 50ms rather than just around 50ms, so the long-press sets off both watches.
What's a better set of arguments for the watch to detect, say, a press of between 50ms-100ms?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Oh, one thing that I know is definitely not correct in my code (but not fatally) is the fact that even the long-presses of the button set off the short-press function. I figure that, as written, the short-press watch is watching for presses of at least 50ms rather than just around 50ms, so the long-press sets off both watches.
What's a better set of arguments for the watch to detect, say, a press of between 50ms-100ms?