ant-cycling-power
ant-cycling-power copied to clipboard
is_present( ) causes the stick to close
See my bug filed here: https://github.com/Loghorn/ant-plus/issues
When I call is_present()
, the stick seems to close... or otherwise put the object in a bad state such that write()
fails and throws and exception.
if (!this.stick.is_present()) { .. }
I've verified open()
returns true before calling is_present()
, and then after calling is_present()
I verified open()
returns false. See ./src/ant.ts
file.
Fix: In powermeter.js, please comment out the offending lines. Once removed, the program runs nicely. PowerMeter.prototype.broadcast = function(power, cadence) {
PowerMeter.prototype.broadcast = function(power, cadence) {
// BUG do not call is_present() else the stick closes!
/*if (!this.stick.is_present()) {
console.log("Stick not present.");
return;
}*/
...
}`