ant-plus
ant-plus copied to clipboard
Event is not emitted for SpeedSensor
The event speedData is not emitted when using SpeedSensor but is emitted when using SpeedScanner.
Device is "verified" as attached via the attached event when using SpeedSensor
That's odd because they are both calling the same function to process the data. Can you send me some code that shows the problem? Thank you
Yea I looked through it as well and figured I might have missed something else so I opened this issue. But I guess not. Weird. Some code:
var Ant = require('ant-plus');
var stick = new Ant.GarminStick3;
var speedysense = new Ant.SpeedSensor(stick);
var hrsense = new Ant.HeartRateSensor(stick);
hrsense.on('hbData', (e) => {
console.dir(e);
});
speedysense.on('speedData', (speed) => {
console.dir(speed); //nothing happens
});
speedysense.on('attached', (data) => {
console.log("Attached!", data);
});
stick.on('startup', function () {
hrsense.attach(1, 11905);
speedysense.attach(2, 33135);
});
Initially I thought it was a channel issue as I was playing around with channels but the attached event dispelled that for me although this is my first time using Ant+. Am using a Wahoo Ant+ stick which I understand is just a branded garmin.
Probably related to this issue https://github.com/Loghorn/ant-plus/issues/31