Mercurial > public > ostc4
diff Discovery/Src/unit.c @ 653:269e57ac4e56
Bugfix temperature display Logpage2:
Temperature was shown in Centidegrees (Fahrenheit as well as Celsius). Root cause was that conversion was done via character cutting (string: removal of last digit). This has been replaced by a factor 10 devision.
author | Ideenmodellierer |
---|---|
date | Sun, 25 Apr 2021 20:36:18 +0200 |
parents | 1c95f811967c |
children |
line wrap: on
line diff
--- a/Discovery/Src/unit.c Mon Apr 19 20:34:53 2021 +0200 +++ b/Discovery/Src/unit.c Sun Apr 25 20:36:18 2021 +0200 @@ -107,13 +107,13 @@ } } -uint16_t unit_temperature_integer(uint16_t input_celsius) +int16_t unit_temperature_integer(int16_t input_celsius) { if(settingsGetPointer()->nonMetricalSystem == 0) return input_celsius; else { - return ((input_celsius * 9 / 5) + 320); + return ((input_celsius * 9 / 5) + 32); } }