setWatch Feature Requests #5712
Replies: 1 comment
-
Posted at 2017-02-27 by @gfwilliams The thing I'd be worried about changing Prescale could be an idea though (we'd just have to make sure we knew what data it should be reporting back) - to be honest I've wanted to do a more intelligent Specifically:
I've struggled to think of how best to expose that. I'm wondering whether it's actually better if I let you specify code to execute in the IRQ. I think it should be ok to use JS now - or obviously compiled code/assembler would work best. Then at least it'd be easy enough to write libraries that handle the common cases... Posted at 2017-02-27 by CanyonCasa I like those ideas too. setWatch offers a nice clean way to monitor I/O and generate events and embellishing it would open the door to more sophisticated events.
Then perhaps a Posted at 2017-02-28 by @gfwilliams Yes, that could work. As I said above though it might make more sense to expose these things via the ability to execute custom code in an IRQ. For instance things I can't do now that I'd like to:
Neither of those is going to work desperately well with a general purpose solution... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-27 by CanyonCasa
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.
Beta Was this translation helpful? Give feedback.
All reactions