You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.
and handling all sensors inside each method, wouldn't it not be better to give it an object instead, like Bleno does with Characteristics. That also allows you to easily share objects/value for each sensor instead of relying on global variables. And it allows you to inherit from common objects when they are very similar in spirit.
pseudocode (ignore naming) [the *Callback methods are modelled after latest ES6 compatible Custom Elements spec]:
Looks good, it's mostly syntactic sugar. Your method is complementing events but AFAICT is not replacing them. What is the callback dispatching mechanism? We need support from the main loop.
What idioms are better known by developers? Events at least are pretty well known.
They should be called async on the object itself (so it becomes ). I don't see why main loop support would be needed, as all the resources will be registered in one place.
I like that you naturally keep the relevant code together and this method might be popularized with custom elements and node.js libraries like noble.
Instead of
and handling all sensors inside each method, wouldn't it not be better to give it an object instead, like Bleno does with Characteristics. That also allows you to easily share objects/value for each sensor instead of relying on global variables. And it allows you to inherit from common objects when they are very similar in spirit.
pseudocode (ignore naming) [the *Callback methods are modelled after latest ES6 compatible Custom Elements spec]:
The text was updated successfully, but these errors were encountered: