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?
https://github.com/markdotai/emtb/blob/4667c43fee062969f598ad3a3d960ded9aaaf304/source/emtbDelegate.mc#L656
Thanks