dvmarinoff / Flux

Indoor Cycling App for Structured Training
https://flux-web.vercel.app
GNU Affero General Public License v3.0
505 stars 86 forks source link

Power not working #186

Closed Slinky6267 closed 5 months ago

Slinky6267 commented 5 months ago

Power doesn't show on flux or record to file after the newest update, before that it was working fine.

Controllable light is green and my trainer receives power level from a workout file.

I have tested it on desktop and android, neither of them work.

Trainer: Elite Suito

dvmarinoff commented 5 months ago

@Slinky6267 Thanks for the report!

Any chance you could send me the logs from the developer console? https://flux-dev.vercel.app has the logs enabled. You can open the developer console in Chrome/Edge on desktop with right-click -> inspect. Try to connect the trainer, ride for 20-30 seconds, right-click Save As.

Slinky6267 commented 5 months ago

flux-dev.vercel.app-1710942460342.log

dvmarinoff commented 5 months ago

Thanks! Will go over it!

dvmarinoff commented 5 months ago

@Slinky6267 Hey, I just added a fix for this issue to the dev version at: https:flux-dev.vercel.app.

The issue is, that during the recent changes to the Bluetooth code, I have missplaced the getter for Uint24 values. And Elite trainers send total distance which is formated as Uint24, so the whole parser was breaking because it couldn't find the Uint24 getter. Anyway, I included this bit back and added some tests here:

https://github.com/dvmarinoff/Flux/blob/b8bcb3fbfa3aeb87506b190ad901dfff6eb25782/test/ble/indoor-bike-data.test.js#L35

This should cover the use case. But can I ask you to test with the real device, the Elite Suito trainer whenever you can?

dvmarinoff commented 5 months ago

It's deployed on both main and development version now. I tested with a simulator, hopefully it works with your trainer now.

Slinky6267 commented 5 months ago

After a quick test it seems to be now working. Thanks for the quick fix!

dvmarinoff commented 5 months ago

Thanks for the help and sorry for the inconvenience!

Closing this now...