comparison 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
comparison
equal deleted inserted replaced
566:7761dd028386 567:1c95f811967c
46 /* Exported functions --------------------------------------------------------*/ 46 /* Exported functions --------------------------------------------------------*/
47 47
48 char unit_depth_char1_T105(void) 48 char unit_depth_char1_T105(void)
49 { 49 {
50 if(settingsGetPointer()->nonMetricalSystem) 50 if(settingsGetPointer()->nonMetricalSystem)
51 return '\''; 51 return 'f';
52 else 52 else
53 return 'm'; 53 return 'm';
54 } 54 }
55 55
56 char unit_depth_char2_T105(void) 56 char unit_depth_char2_T105(void)
57 { 57 {
58 if(settingsGetPointer()->nonMetricalSystem) 58 if(settingsGetPointer()->nonMetricalSystem)
59 return ' '; 59 return 't';
60 else 60 else
61 return '\004'; // 004 is nop 61 return '\004'; // 004 is nop
62 } 62 }
63 63
64 char unit_depth_char1(void) 64 char unit_depth_char1(void)
102 if(settingsGetPointer()->nonMetricalSystem == 0) 102 if(settingsGetPointer()->nonMetricalSystem == 0)
103 return input_celsius; 103 return input_celsius;
104 else 104 else
105 { 105 {
106 return input_celsius * (9.0f/5.0f) + 32; 106 return input_celsius * (9.0f/5.0f) + 32;
107 }
108 }
109
110 uint16_t unit_temperature_integer(uint16_t input_celsius)
111 {
112 if(settingsGetPointer()->nonMetricalSystem == 0)
113 return input_celsius;
114 else
115 {
116 return ((input_celsius * 9 / 5) + 320);
107 } 117 }
108 } 118 }
109 119
110 uint16_t unit_speed_integer(uint16_t input_meterPerMinute) 120 uint16_t unit_speed_integer(uint16_t input_meterPerMinute)
111 { 121 {