Mercurial > public > ostc4
diff Discovery/Src/unit.c @ 567:1c95f811967c
-Add 12HR Time Support
-Add firmware image only font extensions
-Show english units when required in log's graphs
-Show decompression info with Font84 if 10 characters long
-Remove usage of ' symbol to denote minutes and instead use min abbreviation
-Show english units when required on the simulation configuration screen
-Remove usage of ' symbol to denote feet in in non-metric mode and use ft abbrevation
author | izzni |
---|---|
date | Tue, 24 Nov 2020 13:22:23 -0600 |
parents | 5f11787b4f42 |
children | 269e57ac4e56 |
line wrap: on
line diff
--- a/Discovery/Src/unit.c Sat Nov 21 17:41:59 2020 +0100 +++ b/Discovery/Src/unit.c Tue Nov 24 13:22:23 2020 -0600 @@ -48,7 +48,7 @@ char unit_depth_char1_T105(void) { if(settingsGetPointer()->nonMetricalSystem) - return '\''; + return 'f'; else return 'm'; } @@ -56,7 +56,7 @@ char unit_depth_char2_T105(void) { if(settingsGetPointer()->nonMetricalSystem) - return ' '; + return 't'; else return '\004'; // 004 is nop } @@ -107,6 +107,16 @@ } } +uint16_t unit_temperature_integer(uint16_t input_celsius) +{ + if(settingsGetPointer()->nonMetricalSystem == 0) + return input_celsius; + else + { + return ((input_celsius * 9 / 5) + 320); + } +} + uint16_t unit_speed_integer(uint16_t input_meterPerMinute) { if(settingsGetPointer()->nonMetricalSystem == 0)