Hi experts,
I've an issue, I want to convert CAN data receive to a float value. I think I don't understand correctly the IEE754 representation in C. I understand well the decomposition of a float on 32 bits, but I do not see how to obtain a float number from my bytes ?
Can you help me please ?
Thanks,
Damien
int32_t data;
void update_param_corrector(struct corrector_parameters * param)
{
data = (int32_t)can_rx_buffer[4];
data |= ((int32_t)can_rx_buffer[5] << 8);
data |= ((int32_t)can_rx_buffer[6] << 16);
data |= ((int32_t)can_rx_buffer[7] << 24);
param->KP = (float32_t)data;
}