You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi :) It looks like NicholasRasi decoded & added that bit, but what it looks to be doing is:
The speed is stored using 2 bytes (in the array of bytes) and is a value in 100m/h.
So first to combine the 2 bytes to a single integer value it multiplies the top byte by 256 (i.e. the <<8) and then it adds the bottom byte to that value (using the bitwise "or" operation). (Each byte stores an unsigned number from 0 to 255).
It then converts the integer value to a floating point one so that it can be divided without losing precision, i.e. it will keep the fractional part after the division.
It then divides by 10 to convert from 100m/h to km/h. I guess for Shimano showing the speed to the nearest km/h was not enough, and they wanted to give 1 decimal point of precision.
Hey, great that you reverse engineered the Shimano bluetooth connection. I don't fully understand what you do here. Can you maybe explain more to me?
emtb/source/emtbDelegate.mc
Line 656 in 4667c43
Thanks
The text was updated successfully, but these errors were encountered: