mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-30 14:16:32 +00:00
Fix loss of precision
Fix loss of precision regression
This commit is contained in:
parent
5af6c1baec
commit
acb2f6e1d9
@ -323,16 +323,17 @@ float TuyaAdjustedTemperature(uint8_t packetValue, uint8_t res)
|
|||||||
switch (res)
|
switch (res)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
return packetValue/10;
|
return (float)packetValue / 10;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
return packetValue/100;
|
return (float)packetValue / 100;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
return packetValue/1000;
|
return (float)packetValue / 1000;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return (float)packetValue;
|
return (float)packetValue;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*********************************************************************************************\
|
/*********************************************************************************************\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user