jasongin / noble-uwp

Noble (Node.js Bluetooth LE) with Windows 10 UWP bindings
MIT License
83 stars 45 forks source link

Set characteristic reads to be uncached by default #49

Closed acstacey closed 6 years ago

acstacey commented 6 years ago

Resolves #48 Cached reads may be desirable in some situations but I was unable to find a way to force a cache update. This is an issue while polling sensors.

ghost commented 6 years ago

@jasongin : what are you thoughts on this one?

jasongin commented 6 years ago

I don't really know... probably it should behave the same as noble on other platforms. Are characteristic reads normally uncached then?

ghost commented 6 years ago

pretty sure!. I'm not sure if any of the read() are cached, whether that be from handle values or characteristics. I must be shortsighted though, there must be some benefit of caching reads otherwise the method wouldn't exist.

jasongin commented 6 years ago

Yeah this seems like the right thing, if some applications actually want caching then they can manage that at a higher layer.