Fix temperature conversion

Fix temperature conversion to still use ConvertTemp() even if meter sends the value in F
This commit is contained in:
andrethomas2 2018-12-18 21:31:00 +02:00 committed by GitHub
parent 201baa3513
commit a6a927b24b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -188,9 +188,7 @@ void AzEverySecond(void)
if(az_response[i] == 'C') { // meter transmits in degC
az_temperature = ConvertTemp((float)az_temperature); // convert to degF, depending on settings
} else { // meter transmits in degF
if(!Settings.flag.temperature_conversion) {
az_temperature = (az_temperature - 32) / 1.8; // convert to degC
}
az_temperature = ConvertTemp((az_temperature - 32) / 1.8); // convert to degC and then C or F depending on setting
}
i++; // advance to first delimiter
if(az_response[i] != ':') {