Closed 8beeeaaat closed 6 years ago
For your information, sample/sample.js was the same behavior too.
I found a solution in src/ant.ts!
- static libConfig(how: number): Buffer {
+ static libConfig(channel: number, how: number): Buffer {
let payload: number[] = [];
- payload = payload.concat(this.intToLEHexArray(0));
+ payload = payload.concat(this.intToLEHexArray(channel));
case Constants.MESSAGE_ENABLE_RX_EXT:
- this.write(Messages.libConfig(0xE0));
+ this.write(Messages.libConfig(channel,0xE0));
case Constants.MESSAGE_CHANNEL_PERIOD:
- this.write(Messages.libConfig(0xE0));
+ this.write(Messages.libConfig(channel,0xE0));
Fixed by 58b6b6d47168806b7dbdaf64928ab2ecbb3a5759
@Loghorn Thank you so much !!
Thank you for the PR. I will soon publish an updated version on npm
I'm programming a Electron app. I did attached HeartRateSensor on channel 0 and SpeedCadenceSensor on channel 1. However, I've received only heart rate data in spite of SpeedCadenceSensor did attached. But, if I replace the channel, I can receive heart rate data instead of speed data. I need your help.
OS: macOS 10.13.2 Beta USB stick: GarminStick2