ZigBeeDataResolver: Use float mode instead of scientific notation mode for double and float value.
This commit is contained in:
parent
fbe3aa7cef
commit
b528d2e3e4
|
@ -453,13 +453,13 @@ QString ZigBeeDataResolver::sensor_data_reader(void **data,QString type)
|
|||
}
|
||||
else if (type=="float")
|
||||
{
|
||||
d = QString::number(*(float*)(*data), 'g', 1);
|
||||
d = QString::number(*(float*)(*data), 'f', 3);
|
||||
*pdata += sizeof(float);
|
||||
return d;
|
||||
}
|
||||
else if (type=="double")
|
||||
{
|
||||
d = QString::number(*(double*)(*data), 'g', 1);
|
||||
d = QString::number(*(double*)(*data), 'f', 3);
|
||||
*pdata += sizeof(double);
|
||||
return d;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue