SOLO BETA User Manual
Convert float data toFixed-point Sfxt(32-17) data for SOLO to be sent in a
data packet:
If the float number is Positive:
1- Multiply the float number into 131072
2- Round down the result into the nearest integer value
3- convert this value to HEX
If the float number is Negative:
1- Multiply the float number into 131072
2- Round down the result into the nearest integer value
3- Ignore the sign of the integer and convert this value to HEX (compute the Absolute value)
4- Subtract data from "0xFFFFFFFF"
Example 1_ positive float number:
Data to be sent : 4.2
Conversion:
1) 4.2 * 2^17 = 550,502.4
2) Round(550502.4) = 550502
3) Hex (550502) = 0x0086666
Example 2_ negative float number:
Data to be sent : -14.36
Conversion:
1) -14.36 * 2^17 = -1,882,193.92
2) Round(-1,882,193.92) = -1,882,193
3) Hex (abs (-1,882,193) )= 0x 001CB851
4) 0xFFFFFFFF - 0x001CB851 = 0xFFE3 47AE
www.solomotorcontrollers.com
January 2021 - Revision V_1.0.5 Copyright © 2020, All right Reversed. SOLO motor controllers.
52