float类型在计算机上存储方式:https://blog.csdn.net/weixin_34393486/article/details/117527664
byte转float
float Tofloat(uchar* p_arr)
{
static int m_count = 0;
float fValue;
uchar ucArray[4];
uchar* pUch = (uchar*)& fValue;
//将二进制转换为float型
ucArray[0] = p_arr[0];
ucArray[1] = p_arr[1];
ucArray[2] = p_arr[2];
ucArray[3] = p_arr[3];
for (int i = 0; i < 4; i++)
{
pUch[i] = ucArray[i];
}
qDebug()<<"m_count = "<< m_count<<"----"<<"fValue="<<fValue;
m_count++;
return fValue;
}