Mercurial > public > ostc4
comparison Discovery/Src/tHome.c @ 516:bd66f4910993
Added quick menu function to big font view:
In t7 (and some options also in t5) selection of bearing, reset of timer and selection of a better gas is provided using a yellow quick menu. This function has been applied to the big font view, where the upper right box (dive time) is used for showing the options
author | Ideenmodellierer |
---|---|
date | Sun, 06 Sep 2020 21:13:22 +0200 |
parents | 06b21f1e47a5 |
children | 6fbf7cd391cb |
comparison
equal
deleted
inserted
replaced
515:218ac999e96b | 516:bd66f4910993 |
---|---|
56 static uint16_t display_toogle_count; | 56 static uint16_t display_toogle_count; |
57 static uint16_t tHome_tick_count_cview; | 57 static uint16_t tHome_tick_count_cview; |
58 static uint16_t tHome_tick_count_field; | 58 static uint16_t tHome_tick_count_field; |
59 | 59 |
60 const uint8_t cv_changelist[] = {CVIEW_Compass, CVIEW_SummaryOfLeftCorner, CVIEW_Tissues, CVIEW_Profile, CVIEW_EADTime, CVIEW_Gaslist, CVIEW_noneOrDebug, CVIEW_Decolist,CVIEW_sensors,CVIEW_sensors_mV, CVIEW_END}; | 60 const uint8_t cv_changelist[] = {CVIEW_Compass, CVIEW_SummaryOfLeftCorner, CVIEW_Tissues, CVIEW_Profile, CVIEW_EADTime, CVIEW_Gaslist, CVIEW_noneOrDebug, CVIEW_Decolist,CVIEW_sensors,CVIEW_sensors_mV, CVIEW_END}; |
61 const uint8_t cv_changelist_BS[] = {CVIEW_T3_Decostop, CVIEW_sensors, CVIEW_Compass, CVIEW_T3_MaxDepth,CVIEW_T3_StopWatch, CVIEW_T3_TTS, CVIEW_T3_ppO2andGas, CVIEW_noneOrDebug, CVIEW_T3_Navigation, CVIEW_T3_DepthData, CVIEW_T3_END}; | 61 const uint8_t cv_changelist_BS[] = {CVIEW_T3_Decostop, CVIEW_sensors, CVIEW_Compass, CVIEW_T3_MaxDepth,CVIEW_T3_StopWatch, CVIEW_T3_TTS, CVIEW_T3_GasList, CVIEW_T3_ppO2andGas, CVIEW_noneOrDebug, CVIEW_T3_Navigation, CVIEW_T3_DepthData, CVIEW_T3_END}; |
62 | 62 |
63 /* Private function prototypes -----------------------------------------------*/ | 63 /* Private function prototypes -----------------------------------------------*/ |
64 | 64 |
65 /* Exported functions --------------------------------------------------------*/ | 65 /* Exported functions --------------------------------------------------------*/ |
66 | 66 |
146 if(sendAction == ACTION_BUTTON_NEXT) | 146 if(sendAction == ACTION_BUTTON_NEXT) |
147 { | 147 { |
148 if(settingsGetPointer()->design == 4) | 148 if(settingsGetPointer()->design == 4) |
149 return; | 149 return; |
150 | 150 |
151 if(settingsGetPointer()->design == 3) | |
152 { | |
153 settingsGetPointer()->design = 7; | |
154 if(settingsGetPointer()->MotionDetection == MOTION_DETECT_SECTOR) | |
155 { | |
156 DefinePitchSectors(stateRealGetPointer()->lifeData.compass_pitch,CUSTOMER_DEFINED_VIEWS); | |
157 } | |
158 } | |
159 switch(get_globalState()) | 151 switch(get_globalState()) |
160 { | 152 { |
161 case StD: | 153 case StD: |
162 if(settingsGetPointer()->design == 6) | 154 if(settingsGetPointer()->design == 6) |
163 { | 155 { |
164 if(is_stateUsedSetToSim()) | 156 if(is_stateUsedSetToSim()) |
165 set_globalState(StDSIM1); | 157 set_globalState(StDSIM1); |
166 else | 158 else |
167 set_globalState(StDQUIT); | 159 set_globalState(StDQUIT); |
175 else | 167 else |
176 set_globalState(StDRAVG); | 168 set_globalState(StDRAVG); |
177 break; | 169 break; |
178 } | 170 } |
179 | 171 |
172 if(settingsGetPointer()->design == 3) | |
173 { | |
174 switch(t3_getCustomView()) | |
175 { | |
176 case CVIEW_T3_Navigation: | |
177 case CVIEW_Compass: set_globalState(StDBEAR); | |
178 break; | |
179 case CVIEW_T3_StopWatch: set_globalState(StDRAVG); | |
180 break; | |
181 case CVIEW_T3_GasList: if(stateUsed->warnings.betterGas) | |
182 { | |
183 set_globalState(StDMGAS); | |
184 } | |
185 break; | |
186 default: | |
187 break; | |
188 } | |
189 break; | |
190 } | |
191 | |
180 if(stateUsed->warnings.betterGas) | 192 if(stateUsed->warnings.betterGas) |
181 set_globalState(StDMGAS); | 193 set_globalState(StDMGAS); |
182 else | 194 else |
183 if(stateUsed->warnings.betterSetpoint) | 195 if(stateUsed->warnings.betterSetpoint) |
184 set_globalState(StDMSPT); | 196 set_globalState(StDMSPT); |
185 else | 197 else |
186 set_globalState(StDMENU); | 198 set_globalState(StDMENU); |
187 break; | 199 break; |
188 | 200 |
189 case StDMGAS: | 201 case StDMGAS: |
190 if(stateUsed->warnings.betterSetpoint) | 202 if(settingsGetPointer()->design == 3) |
191 set_globalState(StDMSPT); | 203 { |
192 else | 204 set_globalState(StD); |
193 set_globalState(StDMENU); | 205 } |
206 else | |
207 { | |
208 if(stateUsed->warnings.betterSetpoint) | |
209 set_globalState(StDMSPT); | |
210 else | |
211 set_globalState(StDMENU); | |
212 } | |
194 break; | 213 break; |
195 | 214 |
196 case StDMSPT: | 215 case StDMSPT: |
197 set_globalState(StDMENU); | 216 set_globalState(StDMENU); |
198 break; | 217 break; |
218 | 237 |
219 case StDSIM4: | 238 case StDSIM4: |
220 set_globalState(StD); | 239 set_globalState(StD); |
221 break; | 240 break; |
222 | 241 |
223 case StDBEAR: // t5_gauge | 242 case StDBEAR: |
224 set_globalState(StDRAVG); | 243 if(settingsGetPointer()->design == 5) |
225 break; | 244 { |
226 | 245 set_globalState(StDRAVG); |
227 case StDRAVG: // t5_gauge | 246 } |
228 if(is_stateUsedSetToSim()) | 247 |
229 set_globalState(StDSIM1); | 248 if(settingsGetPointer()->design == 3) |
230 else | 249 { |
231 set_globalState(StD); | 250 if(t3_getCustomView() == CVIEW_T3_Navigation) |
232 break; | 251 { |
233 | 252 set_globalState(StDRAVG); |
253 } | |
254 else | |
255 { | |
256 set_globalState(StD); | |
257 } | |
258 } | |
259 break; | |
260 case StDRAVG: | |
261 if(settingsGetPointer()->design == 5) | |
262 { | |
263 if(is_stateUsedSetToSim()) | |
264 set_globalState(StDSIM1); | |
265 else | |
266 set_globalState(StD); | |
267 break; | |
268 } | |
269 else | |
270 { | |
271 set_globalState(StD); | |
272 } | |
273 break; | |
234 case StDQUIT: // t6_apnea | 274 case StDQUIT: // t6_apnea |
235 set_globalState(StD); | 275 set_globalState(StD); |
236 break; | 276 break; |
237 | 277 |
238 default: | 278 default: |
242 | 282 |
243 if(sendAction == ACTION_BUTTON_ENTER) | 283 if(sendAction == ACTION_BUTTON_ENTER) |
244 { | 284 { |
245 if(settingsGetPointer()->design == 4) | 285 if(settingsGetPointer()->design == 4) |
246 return; | 286 return; |
247 | |
248 if(settingsGetPointer()->design == 3) /* switch back to t7 (standard) view */ | |
249 { | |
250 settingsGetPointer()->design = 7; | |
251 if(settingsGetPointer()->MotionDetection == MOTION_DETECT_SECTOR) | |
252 { | |
253 DefinePitchSectors(stateRealGetPointer()->lifeData.compass_pitch,CUSTOMER_DEFINED_VIEWS); | |
254 } | |
255 } | |
256 | 287 |
257 switch(get_globalState()) | 288 switch(get_globalState()) |
258 { | 289 { |
259 case StDMGAS: | 290 case StDMGAS: |
260 openEdit_DiveSelectBetterGas(); | 291 openEdit_DiveSelectBetterGas(); |