-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CalculatedSpeed not working #4
Comments
@YoNo2000 Are these two console.logs being output? If the 'speedCadenceSensor attached' log is not output, then the speed sensor you are using may not be SpeedCadenceSensor. https://github.com/8beeeaaat/web-ant-plus/blob/master/src/sensors/SpeedSensor.ts |
Sorry if you are already using SpeedSensor and SpeedCadenceSensor...
By the way, just to confirm for your information, I did not envision an implementation where you would use ANT+ IDs. |
@8beeeaaat Thanks for the reply back. I had placed both the corresponding ANT+ IDs in both CadenceSensor.ts and SpeedSensor.ts For example: type: 'receive', This is what I have done. I didn't know that you didn't need to actually put the Ant+ IDs in. As for your question, yes the log says they are connected heartRateSensor attached |
In fact, the original package does not need to use the actual device-specific ID for DeviceID to work. 😄
👍
web-ant-plus/src/lib/UpdateState.ts Lines 101 to 124 in 7916f5c
I would appreciate a reply once you have identified the cause. |
@8beeeaaat Thanks for your patience. I have been looking into the problem over the past few days and trying to get familiar with React and Node as I am new. I believe I may know what the problem is: Anything that uses the Speed & Cadence sensors is using the wrong Channel period. Ant+ state in the document: D00001163_-_ANT+Device_Profile-_Bicycle_Speed_and_Cadence That the channel period must be 8118. However, in one of the cadence sensor typescript files I opened, it is 8086. After then searching on the original package from Loghorn, it appears that another user pointed this out a few years ago but this wasn't actually changed: Loghorn#31 I did attempt to change it to 8118, but I couldn't get it working on my end as I'm not sure which files to edit and whether I need to reinstall this package again. If there's anything I can do, let me know. Thanks. |
Thank you for your research! Please try changing this 8086 to 8118 and then use SpeedSensor instead of SpeedCadenceSensor in the sample application. web-ant-plus/src/sensors/SpeedSensor.ts Line 27 in 7916f5c
If it works correctly, I'd appreciate it if you could send me a Pull Request! |
@8beeeaaat That works. However, I changed SpeedCadenceSensor period & deviceType (to match SpeedSensor)to make it work as a test as I believe I would stumble across another issue. Yes, the speed was now displaying and working but the cadence wasn't and even if I changed it to SpeedSensor the same would've happened I believe. The app uses: BicyclePowerSensor But it would need to use one more sensor, such as cadence? I am not too sure about the implementation of this as I believe the formulas are different and the example app would need to be rewritten to allow the additional data field of cadence if I am correct? Thanks *Sorry I accidentally closed the issue. |
@8beeeaaat Additional feedback to my comment above: I believe if I am correct that this package is getting Cadence from the Power Meter. However, if a user does not have a Power Meter then the application would not display all the data fields and a user would need to choose between Cadence or Speed by changing the Channel Period & deviceType (for either speed or cadence to match Ant+ documentation). This is even if you use SpeedSensor instead of SpeedCadenceSensor. I will try and confirm this later today and get back to you. Thanks Cadence Power |
Thank you for your feedbacks!
I use a Pioneer pedaling monitor device. This device functions as a BicyclePowerSensor and transmits power and cadence via ANT+. This sample is not intended to be used as-is by developers, but is intended to be selected by developers themselves to suit their own development environment. Tanks! |
Hi,
I am able to get the application running. Cadence and Power are working fine. But the CalculatedSpeed does not display a value for me. I have added my Ant+ IDs which are 6 six digits to the CadenceSensor.ts and SpeedSensor.ts
I also did not enter an Ant+ ID for my power meter, but it is picking up the power and displaying it. Not sure if there's anything conflicting with that.
Thanks
The text was updated successfully, but these errors were encountered: