Mercurial > public > ostc4
comparison Discovery/Src/tMenuXtra.c @ 707:e81afd727993
Menu cleanup rebreather specific settings:
In the previous version the selection for Fix setpoint or sensor was in the deco menu and the Fallback option in the hardware menu. As they have a dependency and are only relevant for rebreather operation, they have been moved into the extra menu which is containing rebreather related data and which is only visible in rebreather mode.
author | Ideenmodellierer |
---|---|
date | Thu, 03 Nov 2022 20:44:21 +0100 |
parents | 1b995079c045 |
children | 6b248bcdbf28 |
comparison
equal
deleted
inserted
replaced
706:10b7d271b9c4 | 707:e81afd727993 |
---|---|
39 | 39 |
40 /* Exported functions --------------------------------------------------------*/ | 40 /* Exported functions --------------------------------------------------------*/ |
41 | 41 |
42 uint32_t tMXtra_refresh(uint8_t line, char *text, uint16_t *tab, char *subtext) | 42 uint32_t tMXtra_refresh(uint8_t line, char *text, uint16_t *tab, char *subtext) |
43 { | 43 { |
44 uint8_t textPointer; | 44 uint8_t textPointer = 0; |
45 uint8_t CcrModusTxtId = 0; | |
45 | 46 |
46 textPointer = 0; | 47 textPointer = 0; |
47 *tab = 500; | 48 *tab = 500; |
48 *subtext = 0; | 49 *subtext = 0; |
49 | 50 |
121 textPointer += 2; | 122 textPointer += 2; |
122 } | 123 } |
123 } | 124 } |
124 else /* Surface MODE */ | 125 else /* Surface MODE */ |
125 { | 126 { |
127 | |
126 if((line == 0) || (line == 1)) | 128 if((line == 0) || (line == 1)) |
127 { | 129 { |
130 switch(pSettings->CCR_Mode) | |
131 { | |
132 case CCRMODE_Sensors: CcrModusTxtId = TXT_Sensor; | |
133 break; | |
134 case CCRMODE_FixedSetpoint: CcrModusTxtId = TXT_FixedSP; | |
135 break; | |
136 case CCRMODE_Simulation: CcrModusTxtId = TXT_SimPpo2; | |
137 break; | |
138 default: CcrModusTxtId = 'X'; | |
139 break; | |
140 } | |
128 textPointer += snprintf(&text[textPointer], 60,\ | 141 textPointer += snprintf(&text[textPointer], 60,\ |
129 "%c" | 142 "%c" |
130 "\016\016(%c)\17" | 143 "\t" |
131 "\002" | 144 "%c" |
132 "%u" | 145 , TXT_CCRmode |
133 "\016\016" | 146 , CcrModusTxtId |
134 " %c" | 147 ); |
135 "\017" | 148 |
136 ,TXT_ScrubTime | 149 strcpy(&text[textPointer],"\n\r"); |
137 ,TXT_Maximum | 150 textPointer += 2; |
138 ,pSettings->scrubTimerMax | |
139 ,TXT_Minutes | |
140 ); | |
141 } | 151 } |
142 strcpy(&text[textPointer],"\n\r"); | 152 |
143 textPointer += 2; | |
144 if((line == 0) || (line == 2)) | 153 if((line == 0) || (line == 2)) |
145 { | 154 { |
146 textPointer += snprintf(&text[textPointer], 60,\ | 155 textPointer += snprintf(&text[textPointer], 60,\ |
147 "%c\002%03u\016\016 %c\017" | 156 "%c" |
148 ,TXT_ScrubTimeReset | 157 ,TXT_Fallback |
149 ,pSettings->scrubTimerCur | 158 ); |
150 ,TXT_Minutes); | 159 |
151 } | 160 text[textPointer++] = '\t'; |
152 strcpy(&text[textPointer],"\n\r"); | 161 if(settingsGetPointer()->fallbackToFixedSetpoint) |
153 textPointer += 2; | 162 text[textPointer++] = '\005'; |
163 else | |
164 text[textPointer++] = '\006'; | |
165 | |
166 strcpy(&text[textPointer],"\n\r"); | |
167 textPointer += 2; | |
168 } | |
169 | |
170 | |
154 if((line == 0) || (line == 3)) | 171 if((line == 0) || (line == 3)) |
155 { | 172 { |
156 switch(pSettings->scrubTimerMode) | 173 textPointer += snprintf(&text[textPointer], 60,\ |
157 { | 174 "%c" |
158 case SCRUB_TIMER_OFF: | 175 ,TXT_ScrubTime |
159 default: textPointer += snprintf(&text[textPointer], 60,"%c\002%c%c",TXT_ScrubTimeMode, TXT_2BYTE, TXT2BYTE_MoCtrlNone ); | 176 ); |
160 break; | 177 strcpy(&text[textPointer],"\n\r"); |
161 case SCRUB_TIMER_MINUTES: textPointer += snprintf(&text[textPointer], 60,"%c\002%c",TXT_ScrubTimeMode, TXT_Minutes ); | 178 textPointer += 2; |
162 break; | 179 } |
163 case SCRUB_TIMER_PERCENT: textPointer += snprintf(&text[textPointer], 60,"%c\002%c",TXT_ScrubTimeMode, TXT_Percent ); | 180 |
164 break; | 181 |
165 } | |
166 } | |
167 strcpy(&text[textPointer],"\n\r"); | |
168 textPointer += 2; | |
169 | 182 |
170 #ifdef ENABLE_PSCR_MODE | 183 #ifdef ENABLE_PSCR_MODE |
171 if(pSettings->dive_mode == DIVEMODE_PSCR) | 184 if(pSettings->dive_mode == DIVEMODE_PSCR) |
172 { | 185 { |
173 if((line == 0) || (line == 4)) | 186 if((line == 0) || (line == 4)) |
174 { | 187 { |
175 textPointer += snprintf(&text[textPointer], 60,\ | 188 textPointer += snprintf(&text[textPointer], 60,\ |
176 "%c\002%02u\016\016%%\017" | 189 "%c" |
177 ,TXT_PSCRO2Drop | 190 ,TXT_PSClosedCircuit); |
178 ,pSettings->pscr_o2_drop); | |
179 } | 191 } |
180 strcpy(&text[textPointer],"\n\r"); | |
181 textPointer += 2; | |
182 if((line == 0) || (line == 5)) | |
183 { | |
184 textPointer += snprintf(&text[textPointer], 60,\ | |
185 "%c\002 1/%02u" | |
186 ,TXT_PSCRLungRatio | |
187 ,pSettings->pscr_lung_ratio); | |
188 } | |
189 strcpy(&text[textPointer],"\n\r"); | |
190 textPointer += 2; | |
191 } | 192 } |
192 #endif | 193 #endif |
193 #ifdef ENABLE_CO2_SUPPORT | 194 #ifdef ENABLE_CO2_SUPPORT |
194 if((line == 0) || (line == 6)) | 195 if((line == 0) || (line == 4)) |
195 { | 196 { |
196 textPointer += snprintf(&text[textPointer], 60, "%c", TXT_CO2Sensor); | 197 textPointer += snprintf(&text[textPointer], 60, "%c", TXT_CO2Sensor); |
197 } | 198 } |
198 #endif | 199 #endif |
199 } | 200 } |