Hi,
I am currently trying to send a 32-bit floating point number over the SCI interface. Unfortunately every type conversion from float to unsigned int, that I tried, didn't work. My plan was to
- Convert float to uint
- Mask byte
- Bitshift
- Send byte over SCI
With
float test_float = 42.0; Uint32 test_int
I tried both
test_int = (Uint32)test_float; test_int = test_float;
but test_int was zero in both cases.
What is the proper way to do it ?
Thank you in advance.
~Brian