mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 21:26:33 +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)
|
||||
{
|
||||
case 1:
|
||||
return packetValue/10;
|
||||
return (float)packetValue / 10;
|
||||
break;
|
||||
case 2:
|
||||
return packetValue/100;
|
||||
return (float)packetValue / 100;
|
||||
break;
|
||||
case 3:
|
||||
return packetValue/1000;
|
||||
return (float)packetValue / 1000;
|
||||
break;
|
||||
default:
|
||||
return (float)packetValue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*********************************************************************************************\
|
||||
|
Loading…
x
Reference in New Issue
Block a user