Closed bobrippling closed 8 months ago
Thanks!
I guess it raises the question of whether we should actually make getPressure always return a promise - but that doesn't help firmwares that are out there already
Yeah, although I suppose if we always return a promise, then for hardware without a barometer, we'd (probably) choose to resolve with undefined
. So I think how things currently are is better, since then a caller will find out immediately whether they'll get a pressure reading, rather than when the promise resolves.
Yes, I was thinking we might reject the promise - but as you say that would be harder to track down as it won't have a stack trace
Some small typescript and doc tweaks to
getPressure