Mercurial > public > hwos_code
comparison src/menu_tree.asm @ 523:8e75aecb3290
BUGFIX: Menu tree cleaned up (Exited to CCR menu from simulator settings)
author | heinrichsweikamp |
---|---|
date | Fri, 04 Aug 2017 19:20:58 +0200 |
parents | 4e6f5c36f4cc |
children | d2e52e6e1604 |
comparison
equal
deleted
inserted
replaced
522:4d70a93b18cb | 523:8e75aecb3290 |
---|---|
109 | 109 |
110 do_PSCR_menu: | 110 do_PSCR_menu: |
111 MENU_BEGIN tPSCRMenu, .3 ; PSCR Menu | 111 MENU_BEGIN tPSCRMenu, .3 ; PSCR Menu |
112 MENU_OPTION tPSCR_O2_drop, oPSCR_drop, 0 | 112 MENU_OPTION tPSCR_O2_drop, oPSCR_drop, 0 |
113 MENU_OPTION tPSCR_lungratio,oPSCR_lungratio, 0 | 113 MENU_OPTION tPSCR_lungratio,oPSCR_lungratio, 0 |
114 MENU_CALL tExit, do_ccr_menu | 114 MENU_CALL tExit, return_ccr_menu |
115 MENU_END | 115 MENU_END |
116 | 116 |
117 do_calibrate_menu: | 117 do_calibrate_menu: |
118 call enable_ir_s8 ; Enable IR/S8-Port | 118 call enable_ir_s8 ; Enable IR/S8-Port |
119 bsf menu_show_sensors2 ; Set flag | 119 bsf menu_show_sensors2 ; Set flag |
129 | 129 |
130 do_calibrate_mix: | 130 do_calibrate_mix: |
131 extern calibrate_mix | 131 extern calibrate_mix |
132 call calibrate_mix ; Calibrate with opt_calibration_O2_ratio, also calibrate S8 HUD if connected | 132 call calibrate_mix ; Calibrate with opt_calibration_O2_ratio, also calibrate S8 HUD if connected |
133 WAITMS d'250' ; Wait for HUD v3 | 133 WAITMS d'250' ; Wait for HUD v3 |
134 goto restart ; Restart into surface mode | 134 goto restart ; Restart into surface mode |
135 | 135 |
136 do_ccr_sensor: | 136 do_ccr_sensor: |
137 call enable_ir_s8 ; Enable IR/S8-Port | 137 call enable_ir_s8 ; Enable IR/S8-Port |
138 bsf menu_show_sensors ; Set flag | 138 bsf menu_show_sensors ; Set flag |
139 MENU_BEGIN tCCRSensor, .5 | 139 MENU_BEGIN tCCRSensor, .5 |
241 movff PLUSW1,lo ; Used as temp | 241 movff PLUSW1,lo ; Used as temp |
242 movlw .3 ; 3=Deco | 242 movlw .3 ; 3=Deco |
243 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") | 243 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") |
244 movlw .2 ; 2=Normal | 244 movlw .2 ; 2=Normal |
245 cpfseq lo | 245 cpfseq lo |
246 bra return_gas_depth ; Non-Deco gas or "Normal" Diluent, Return! | 246 bra do_edit_gas_menu_1 ; Non-Deco gas or "Normal" Diluent, Return! |
247 | 247 |
248 MENU_BEGIN tGasEdit, .7 | 248 MENU_BEGIN tGasEdit, .7 |
249 MENU_DYNAMIC gaslist_gastitle, 0 | 249 MENU_DYNAMIC gaslist_gastitle, 0 |
250 MENU_DYNAMIC gaslist_MOD_END, 0 | 250 MENU_DYNAMIC gaslist_MOD_END, 0 |
251 MENU_DYNAMIC gaslist_ppo2, 0 ; ppO2 at change depth | 251 MENU_DYNAMIC gaslist_ppo2, 0 ; ppO2 at change depth |
270 lfsr FSR0,obottomTime | 270 lfsr FSR0,obottomTime |
271 call option_reset | 271 call option_reset |
272 lfsr FSR0,obottomDepth | 272 lfsr FSR0,obottomDepth |
273 call option_reset | 273 call option_reset |
274 | 274 |
275 do_planner_menu_1: | |
276 rcall menu_tree_double_pop ; R.L. | |
275 do_planner_menu: | 277 do_planner_menu: |
276 extern do_demo_planner | 278 extern do_demo_planner |
277 MENU_BEGIN tPlan, .7 | 279 MENU_BEGIN tPlan, .7 |
278 MENU_CALL tInter, do_demo_divemode | 280 MENU_CALL tInter, do_demo_divemode |
279 MENU_OPTION tIntvl, odiveInterval, 0 | 281 MENU_OPTION tIntvl, odiveInterval, 0 |
286 | 288 |
287 do_planner_config: | 289 do_planner_config: |
288 MENU_BEGIN tPlan, .3 | 290 MENU_BEGIN tPlan, .3 |
289 MENU_OPTION tSetBotUse, obottom_usage, 0 | 291 MENU_OPTION tSetBotUse, obottom_usage, 0 |
290 MENU_OPTION tSetDecoUse, odeco_usage, 0 | 292 MENU_OPTION tSetDecoUse, odeco_usage, 0 |
291 MENU_CALL tExit, do_planner_menu | 293 MENU_CALL tExit, do_planner_menu_1 |
292 MENU_END | 294 MENU_END |
293 | 295 |
294 | 296 |
295 ;============================================================================= | 297 ;============================================================================= |
296 ; Divemode menu | 298 ; Divemode menu |
297 | 299 |
298 do_return_divemode_menu: | 300 do_return_divemode_menu: |
389 | 391 |
390 do_settings_menu_more_piezo_exit: | 392 do_settings_menu_more_piezo_exit: |
391 call TFT_ClearScreen | 393 call TFT_ClearScreen |
392 extern piezo_config | 394 extern piezo_config |
393 call piezo_config ; Configure buttons | 395 call piezo_config ; Configure buttons |
394 | 396 ; bra do_settings_menu_more_piezo |
395 do_settings_menu_more_piezo: | 397 do_settings_menu_more_piezo: |
396 MENU_BEGIN tSystSets, .7 | 398 MENU_BEGIN tSystSets, .7 |
397 MENU_CALL tCompassMenu, do_compass_menu | 399 MENU_CALL tCompassMenu, do_compass_menu |
398 MENU_CALL tLogOffset, do_log_offset_menu | 400 MENU_CALL tLogOffset, do_log_offset_menu |
399 MENU_OPTION tUnits, oUnits, 0 | 401 MENU_OPTION tUnits, oUnits, 0 |
481 write_int_eeprom .3 ; Clear total dives | 483 write_int_eeprom .3 ; Clear total dives |
482 write_int_eeprom .4 | 484 write_int_eeprom .4 |
483 write_int_eeprom .5 | 485 write_int_eeprom .5 |
484 write_int_eeprom .6 ; Reset logbook pointers | 486 write_int_eeprom .6 ; Reset logbook pointers |
485 call ext_flash_erase_logbook ; And complete logbook (!) | 487 call ext_flash_erase_logbook ; And complete logbook (!) |
486 goto do_continue_main_menu ; back to menu | 488 goto do_continue_menu_4stack ; back to menu |
487 | 489 |
488 | 490 |
489 do_reset_deco: | 491 do_reset_deco: |
490 movlw d'79' ; 79% N2 | 492 movlw d'79' ; 79% N2 |
491 movff WREG,char_I_N2_ratio | 493 movff WREG,char_I_N2_ratio |
503 banksel common | 505 banksel common |
504 clrf nofly_time+0 ; Reset NoFly | 506 clrf nofly_time+0 ; Reset NoFly |
505 clrf nofly_time+1 | 507 clrf nofly_time+1 |
506 clrf desaturation_time+0 ; Reset Desat | 508 clrf desaturation_time+0 ; Reset Desat |
507 clrf desaturation_time+1 | 509 clrf desaturation_time+1 |
508 goto do_return_settings ; back to menu | 510 goto do_continue_menu_4stack ; back to menu |
509 | 511 |
510 do_reset_settings: | 512 do_reset_settings: |
511 call TFT_ClearScreen ; Clear screen | 513 call TFT_ClearScreen ; Clear screen |
512 banksel common | 514 banksel common |
513 extern option_reset_all | 515 extern option_reset_all |
514 call option_reset_all ; Reset all options to factory default. | 516 call option_reset_all ; Reset all options to factory default. |
515 goto restart ; Restart into surfacemode | 517 goto restart ; Restart into surfacemode, to show reset values like gases and deco model to the user |
516 | 518 |
519 do_continue_menu_4stack: ; Return four levels deep | |
520 call menu_processor_pop | |
517 do_continue_menu_3stack: ; Return three levels deep | 521 do_continue_menu_3stack: ; Return three levels deep |
518 call menu_processor_pop | 522 call menu_processor_pop |
519 goto do_return_settings | 523 goto do_return_settings |
520 | 524 |
521 do_reboot: | 525 do_reboot: |
522 call ext_flash_enable_protection ; Enables write protection | 526 call ext_flash_enable_protection ; Enables write protection |
523 reset | 527 reset |
524 | 528 |