Mercurial > public > hwos_code
comparison src/menu_tree.asm @ 428:eccae727702f
some cleanup
author | heinrichsweikamp |
---|---|
date | Wed, 15 Jun 2016 12:26:48 +0200 |
parents | 61984f91174a |
children | aadfe9f2edaf |
comparison
equal
deleted
inserted
replaced
427:ceb1b7329dce | 428:eccae727702f |
---|---|
37 do_main_menu2: | 37 do_main_menu2: |
38 bcf sleepmode ; for timeout | 38 bcf sleepmode ; for timeout |
39 call menu_processor_reset ; restart from first icon. | 39 call menu_processor_reset ; restart from first icon. |
40 | 40 |
41 do_continue_main_menu: | 41 do_continue_main_menu: |
42 call menu_processor_pop ; drop exit line. | 42 rcall menu_tree_double_pop ; drop exit line and back to last line |
43 call menu_processor_pop ; back to last icon. | |
44 | 43 |
45 extern do_demo_divemode, restart | 44 extern do_demo_divemode, restart |
46 MENU_BEGIN tMainMenu, .7 | 45 MENU_BEGIN tMainMenu, .7 |
47 MENU_CALL tLogbook, logbook | 46 MENU_CALL tLogbook, logbook |
48 MENU_CALL tGasSetup, do_gas_menu | 47 MENU_CALL tGasSetup, do_gas_menu |
64 | 63 |
65 ;============================================================================= | 64 ;============================================================================= |
66 ; CCR Setup | 65 ; CCR Setup |
67 | 66 |
68 return_ccr_menu: | 67 return_ccr_menu: |
69 call menu_processor_pop ; drop exit line. | 68 rcall menu_tree_double_pop ; drop exit line and back to last line |
70 call menu_processor_pop ; back to last gas. | |
71 | 69 |
72 do_ccr_menu: | 70 do_ccr_menu: |
73 bcf menu_show_sensors ; Clear flag | 71 bcf menu_show_sensors ; Clear flag |
74 bcf menu_show_sensors2 ; Clear flag | 72 bcf menu_show_sensors2 ; Clear flag |
75 btfsc analog_o2_input | 73 btfsc analog_o2_input |
146 MENU_DYNAMIC gaslist_strcat_gas_mod, do_edit_gas_menu | 144 MENU_DYNAMIC gaslist_strcat_gas_mod, do_edit_gas_menu |
147 MENU_CALL tExit, return_ccr_menu | 145 MENU_CALL tExit, return_ccr_menu |
148 MENU_END | 146 MENU_END |
149 | 147 |
150 do_return_fixed_setpoints: | 148 do_return_fixed_setpoints: |
151 call menu_processor_pop ; drop exit line. | 149 rcall menu_tree_double_pop ; drop exit line and back to last line |
152 call menu_processor_pop ; back to last gas. | |
153 | 150 |
154 do_fixed_setpoints: | 151 do_fixed_setpoints: |
155 bcf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint | 152 bcf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint |
156 MENU_BEGIN tFixedSetpoints, .6 | 153 MENU_BEGIN tFixedSetpoints, .6 |
157 MENU_DYNAMIC gaslist_strcat_setpoint, do_edit_sp_menu | 154 MENU_DYNAMIC gaslist_strcat_setpoint, do_edit_sp_menu |
174 | 171 |
175 ;============================================================================= | 172 ;============================================================================= |
176 ; OC Gas Setup | 173 ; OC Gas Setup |
177 | 174 |
178 return_gas_menu: | 175 return_gas_menu: |
179 call menu_processor_pop ; drop exit line. | 176 rcall menu_tree_double_pop ; drop exit line and back to last line |
180 call menu_processor_pop ; back to last gas. | |
181 | 177 |
182 btfsc ccr_diluent_setup ; Return to CCR-Menu? | 178 btfsc ccr_diluent_setup ; Return to CCR-Menu? |
183 bra do_diluent_setup ; Yes. | 179 bra do_diluent_setup ; Yes. |
184 do_gas_menu: | 180 do_gas_menu: |
185 bcf ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") | 181 bcf ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") |
193 MENU_DYNAMIC gaslist_strcat_gas_mod, do_edit_gas_menu | 189 MENU_DYNAMIC gaslist_strcat_gas_mod, do_edit_gas_menu |
194 MENU_CALL tExit, do_continue_main_menu | 190 MENU_CALL tExit, do_continue_main_menu |
195 MENU_END | 191 MENU_END |
196 | 192 |
197 return_gas_depth: | 193 return_gas_depth: |
198 call menu_processor_pop ; drop exit line. | 194 rcall menu_tree_double_pop ; drop exit line and back to last line |
199 call menu_processor_pop ; back to last gas. | |
200 bra do_edit_gas_menu_1 | 195 bra do_edit_gas_menu_1 |
201 | 196 |
202 do_edit_gas_menu: | 197 do_edit_gas_menu: |
203 call gaslist_setgas ; Save current item. | 198 call gaslist_setgas ; Save current item. |
204 do_edit_gas_menu_1: ; Keep current gas. | 199 do_edit_gas_menu_1: ; Keep current gas. |
220 MENU_CALL tHePlus, gaslist_pHe | 215 MENU_CALL tHePlus, gaslist_pHe |
221 MENU_CALL tHeMinus, gaslist_mHe | 216 MENU_CALL tHeMinus, gaslist_mHe |
222 MENU_CALL tExit, return_gas_depth | 217 MENU_CALL tExit, return_gas_depth |
223 MENU_END | 218 MENU_END |
224 | 219 |
220 menu_tree_double_pop: | |
221 call menu_processor_pop ; drop exit line. | |
222 goto menu_processor_pop ; back to last gas and return | |
223 | |
224 | |
225 global do_gas_depth_menu | 225 global do_gas_depth_menu |
226 do_gas_depth_menu: | 226 do_gas_depth_menu: |
227 movff gaslist_gas,WREG | 227 movff gaslist_gas,WREG |
228 lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] | 228 lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] |
229 movff PLUSW1,lo ; Used as temp | 229 movff PLUSW1,lo ; Used as temp |
282 | 282 |
283 ;============================================================================= | 283 ;============================================================================= |
284 ; Divemode menu | 284 ; Divemode menu |
285 | 285 |
286 do_return_divemode_menu: | 286 do_return_divemode_menu: |
287 call menu_processor_pop ; drop exit line. | 287 rcall menu_tree_double_pop ; drop exit line and back to last line |
288 call menu_processor_pop ; back to last gas. | |
289 | 288 |
290 do_divemode_menu: | 289 do_divemode_menu: |
291 MENU_BEGIN tDiveModeMenu, .7 | 290 MENU_BEGIN tDiveModeMenu, .7 |
292 MENU_OPTION tDvMode, oDiveMode, 0 | 291 MENU_OPTION tDvMode, oDiveMode, 0 |
293 MENU_OPTION tDkMode, oDecoMode, 0 | 292 MENU_OPTION tDkMode, oDecoMode, 0 |
305 MENU_OPTION tShowppO2, oShowppO2, 0 | 304 MENU_OPTION tShowppO2, oShowppO2, 0 |
306 MENU_CALL tExit, do_return_divemode_menu | 305 MENU_CALL tExit, do_return_divemode_menu |
307 MENU_END | 306 MENU_END |
308 | 307 |
309 do_return_decoparameters_menu: | 308 do_return_decoparameters_menu: |
310 call menu_processor_pop ; drop exit line. | 309 rcall menu_tree_double_pop ; drop exit line and back to last line |
311 call menu_processor_pop ; back to setting | |
312 do_decoparameters_menu: | 310 do_decoparameters_menu: |
313 MENU_BEGIN tDecoparameters, .7 | 311 MENU_BEGIN tDecoparameters, .7 |
314 MENU_OPTION tGF_low, oGF_low, 0 | 312 MENU_OPTION tGF_low, oGF_low, 0 |
315 MENU_OPTION tGF_high, oGF_high, 0 | 313 MENU_OPTION tGF_high, oGF_high, 0 |
316 MENU_CALL taGFMenu, do_aGF_menu | 314 MENU_CALL taGFMenu, do_aGF_menu |
330 ;============================================================================= | 328 ;============================================================================= |
331 ; Setup Menu | 329 ; Setup Menu |
332 | 330 |
333 do_return_settings: | 331 do_return_settings: |
334 bcf settime_setdate ; Clear flag | 332 bcf settime_setdate ; Clear flag |
335 call menu_processor_pop ; Drop exit entry | 333 rcall menu_tree_double_pop ; drop exit line and back to last line |
336 call menu_processor_pop ; Pop return line. | |
337 | 334 |
338 extern compass_calibration_loop | 335 extern compass_calibration_loop |
339 do_settings_menu: | 336 do_settings_menu: |
340 btfsc ble_available ; ble available | 337 btfsc ble_available ; ble available |
341 bra do_settings_menu_ble ; Yes. | 338 bra do_settings_menu_ble ; Yes. |
358 MENU_CALL tMore, do_settings_menu_more | 355 MENU_CALL tMore, do_settings_menu_more |
359 MENU_CALL tExit, do_continue_main_menu | 356 MENU_CALL tExit, do_continue_main_menu |
360 MENU_END | 357 MENU_END |
361 | 358 |
362 do_return_settings_more: | 359 do_return_settings_more: |
363 call menu_processor_pop ; Drop exit entry | 360 rcall menu_tree_double_pop ; drop exit line and back to last line |
364 call menu_processor_pop ; Pop return line. | |
365 | 361 |
366 do_settings_menu_more: | 362 do_settings_menu_more: |
367 btfsc rechargeable ; piezo buttons available | 363 btfsc rechargeable ; piezo buttons available |
368 bra do_settings_menu_more_piezo | 364 bra do_settings_menu_more_piezo |
369 btfsc ble_available ; ble available | 365 btfsc ble_available ; ble available |
621 addwfc hi | 617 addwfc hi |
622 goto do_logoffset_common_write ; Store and return | 618 goto do_logoffset_common_write ; Store and return |
623 | 619 |
624 do_dispsets_menu_3stack: | 620 do_dispsets_menu_3stack: |
625 bcf in_color_menu | 621 bcf in_color_menu |
626 call menu_processor_pop | 622 rcall menu_tree_double_pop ; drop exit line and back to last line |
627 call menu_processor_pop | |
628 | 623 |
629 do_dispsets_menu: | 624 do_dispsets_menu: |
630 MENU_BEGIN tDispSets, .5 | 625 MENU_BEGIN tDispSets, .5 |
631 MENU_OPTION tBright, oBrightness, 0 | 626 MENU_OPTION tBright, oBrightness, 0 |
632 MENU_CALL tColorScheme, do_color_scheme | 627 MENU_CALL tColorScheme, do_color_scheme |