I'd like to suggest a couple feature requests for setWatch. I looked at making the code changes myself and while I think I could manage the JavaScript interface changes the event queuing and low level coding is beyond my pay grade, or at least my C++ competency. :)
It would be nice if the repeat parameter accepted an integer value rather than just a Boolean. That would allow one to look for a specific number of transitions and limit overwhelming the event queue for continuous frequency signals.
It would be nice to add a prescale parameter such that some number of transitions must occur for each generated event. My thought here is that this needs to be incorporated at the interrupt level. This would enable observing rapidly changing continuous signals again without overwhelming the event queue.
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.
I'd like to suggest a couple feature requests for setWatch. I looked at making the code changes myself and while I think I could manage the JavaScript interface changes the event queuing and low level coding is beyond my pay grade, or at least my C++ competency. :)
It would be nice if the repeat parameter accepted an integer value rather than just a Boolean. That would allow one to look for a specific number of transitions and limit overwhelming the event queue for continuous frequency signals.
It would be nice to add a prescale parameter such that some number of transitions must occur for each generated event. My thought here is that this needs to be incorporated at the interrupt level. This would enable observing rapidly changing continuous signals again without overwhelming the event queue.