Fix loss of precision

Fix loss of precision regression
This commit is contained in:
jaymemaurice 2021-02-11 16:20:26 -05:00 committed by GitHub
parent 5af6c1baec
commit acb2f6e1d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -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;
}
}
/*********************************************************************************************\