Mercurial > public > hwos_code
comparison src/divemenu_tree.asm @ 646:5b7fe7777425
3.16 release
author | heinrichs weikamp |
---|---|
date | Thu, 14 Oct 2021 12:03:24 +0200 |
parents | 8c1f1f334275 |
children | bc214815deb2 |
comparison
equal
deleted
inserted
replaced
642:a9a0188091e4 | 646:5b7fe7777425 |
---|---|
88 TSTOSS opt_cave_mode ; cave mode switched on? | 88 TSTOSS opt_cave_mode ; cave mode switched on? |
89 bra main_divemenu_OC_nocave ; NO - use version without cave mode entry | 89 bra main_divemenu_OC_nocave ; NO - use version without cave mode entry |
90 ;bra main_divemenu_OC_cave ; YES - use version with cave mode entry | 90 ;bra main_divemenu_OC_cave ; YES - use version with cave mode entry |
91 | 91 |
92 main_divemenu_OC_cave: | 92 main_divemenu_OC_cave: |
93 MENU_BEGIN_DIVE .6 | 93 MENU_BEGIN_DIVE tMainMenu, .6 |
94 MENU_CALL tDivemenu_Gaslist, do_divemode_gaslist | 94 MENU_CALL tDivemenu_Gaslist, do_divemode_gaslist |
95 MENU_CALL tDivemenu_ResetAvg, do_reset_average | 95 MENU_CALL tDivemenu_ResetAvg, do_reset_average |
96 MENU_DYNAMIC dyn_toggle_gf, do_toggle_gf | 96 MENU_DYNAMIC dyn_toggle_gf, do_toggle_gf |
97 MENU_CALL tDivemenu_Marker, do_set_marker | 97 MENU_CALL tDivemenu_Marker, do_set_marker |
98 MENU_CALL tCaveMode, do_main_cavemenu | 98 MENU_CALL tCaveMode, do_main_cavemenu |
99 MENU_CALL tExit, do_exit_divemode_menu | 99 MENU_CALL tExit, do_exit_divemode_menu |
100 MENU_END | 100 MENU_END |
101 ENDIF ; _cave_mode | 101 ENDIF ; _cave_mode |
102 | 102 |
103 main_divemenu_OC_nocave: | 103 main_divemenu_OC_nocave: |
104 MENU_BEGIN_DIVE .5 | 104 MENU_BEGIN_DIVE tMainMenu, .5 |
105 MENU_CALL tDivemenu_Gaslist, do_divemode_gaslist | 105 MENU_CALL tDivemenu_Gaslist, do_divemode_gaslist |
106 MENU_CALL tDivemenu_ResetAvg, do_reset_average | 106 MENU_CALL tDivemenu_ResetAvg, do_reset_average |
107 MENU_DYNAMIC dyn_toggle_gf, do_toggle_gf | 107 MENU_DYNAMIC dyn_toggle_gf, do_toggle_gf |
108 MENU_CALL tDivemenu_Marker, do_set_marker | 108 MENU_CALL tDivemenu_Marker, do_set_marker |
109 MENU_CALL tExit, do_exit_divemode_menu | 109 MENU_CALL tExit, do_exit_divemode_menu |
115 bsf is_diluent_menu ; selecting diluents ... | 115 bsf is_diluent_menu ; selecting diluents ... |
116 bcf is_bailout_menu ; ... (definitely) not for bailout reason | 116 bcf is_bailout_menu ; ... (definitely) not for bailout reason |
117 btfsc FLAG_pscr_mode ; in pSCR mode? | 117 btfsc FLAG_pscr_mode ; in pSCR mode? |
118 bra main_divemenu_pscr ; YES - show pSCR menu | 118 bra main_divemenu_pscr ; YES - show pSCR menu |
119 | 119 |
120 MENU_BEGIN_DIVE .6 | 120 MENU_BEGIN_DIVE tMainMenu, .6 |
121 MENU_CALL tDiveBailout, do_divemode_gaslist_bail | 121 MENU_CALL tDiveBailout, do_divemode_gaslist_bail |
122 MENU_CALL tDivemenu_Setpoint, do_divemode_splist | 122 MENU_CALL tDivemenu_Setpoint, do_divemode_splist |
123 MENU_CALL tDivemenu_Diluent, do_divemode_gaslist | 123 MENU_CALL tDivemenu_Diluent, do_divemode_gaslist |
124 MENU_CALL tDivemenu_Avg_Mkr, do_reset_avg_set_mkr | 124 MENU_CALL tDivemenu_Avg_Mkr, do_reset_avg_set_mkr |
125 MENU_DYNAMIC dyn_toggle_gf, do_toggle_gf | 125 MENU_DYNAMIC dyn_toggle_gf, do_toggle_gf |
134 btfsc ext_input_optical ; do we have an optical input (OSTC 3)? | 134 btfsc ext_input_optical ; do we have an optical input (OSTC 3)? |
135 bra main_divemenu_pscr_sensors ; YES - do menu with calibration | 135 bra main_divemenu_pscr_sensors ; YES - do menu with calibration |
136 ENDIF ; _external_sensor | 136 ENDIF ; _external_sensor |
137 | 137 |
138 main_divemenu_pscr_no_sensors: | 138 main_divemenu_pscr_no_sensors: |
139 MENU_BEGIN_DIVE .6 | 139 MENU_BEGIN_DIVE tMainMenu, .6 |
140 MENU_CALL tDiveBailout, do_divemode_gaslist_bail | 140 MENU_CALL tDiveBailout, do_divemode_gaslist_bail |
141 MENU_CALL tDivemenu_Premix, do_divemode_gaslist | 141 MENU_CALL tDivemenu_Premix, do_divemode_gaslist |
142 MENU_CALL tBackToLoop, do_switch_sp_calc | 142 MENU_CALL tBackToLoop, do_switch_sp_calc |
143 MENU_CALL tDivemenu_Avg_Mkr, do_reset_avg_set_mkr | 143 MENU_CALL tDivemenu_Avg_Mkr, do_reset_avg_set_mkr |
144 MENU_DYNAMIC dyn_toggle_gf, do_toggle_gf | 144 MENU_DYNAMIC dyn_toggle_gf, do_toggle_gf |
145 MENU_CALL tExit, do_exit_divemode_menu | 145 MENU_CALL tExit, do_exit_divemode_menu |
146 MENU_END | 146 MENU_END |
147 | 147 |
148 IFDEF _external_sensor | 148 IFDEF _external_sensor |
149 main_divemenu_pscr_sensors: | 149 main_divemenu_pscr_sensors: |
150 MENU_BEGIN_DIVE .6 | 150 MENU_BEGIN_DIVE tMainMenu, .6 |
151 MENU_CALL tDiveBailout, do_divemode_gaslist_bail | 151 MENU_CALL tDiveBailout, do_divemode_gaslist_bail |
152 MENU_CALL tCCRModeSensor, do_divemode_setpoint_pscr | 152 MENU_CALL tCCRModeSensor, do_divemode_setpoint_pscr |
153 MENU_CALL tDivemenu_Premix, do_divemode_gaslist | 153 MENU_CALL tDivemenu_Premix, do_divemode_gaslist |
154 MENU_CALL tDivemenu_Avg_Mkr, do_reset_avg_set_mkr | 154 MENU_CALL tDivemenu_Avg_Mkr, do_reset_avg_set_mkr |
155 MENU_DYNAMIC dyn_toggle_gf, do_toggle_gf | 155 MENU_DYNAMIC dyn_toggle_gf, do_toggle_gf |
212 movwf active_customview ; set custom view number | 212 movwf active_customview ; set custom view number |
213 call dive_customview_callup ; draw custom view | 213 call dive_customview_callup ; draw custom view |
214 movlw .1 ; set to first option in dive mode menu | 214 movlw .1 ; set to first option in dive mode menu |
215 movwf menu_pos_cur ; ... | 215 movwf menu_pos_cur ; ... |
216 | 216 |
217 MENU_BEGIN_DIVE .2 | 217 MENU_BEGIN_DIVE tDivemenu_ToggleGF, .2 |
218 MENU_CALL tDivemenu_ToggleGF, do_toggle_gf_toggle | 218 MENU_CALL tDivemenu_ToggleGF, do_toggle_gf_toggle |
219 MENU_CALL tExit, do_exit_divemode_menu | 219 MENU_CALL tExit, do_exit_divemode_menu |
220 MENU_END | 220 MENU_END |
221 | 221 |
222 | 222 |
252 ; | 252 ; |
253 do_reset_avg_set_mkr: | 253 do_reset_avg_set_mkr: |
254 movlw .1 ; set to first option in dive mode menu | 254 movlw .1 ; set to first option in dive mode menu |
255 movwf menu_pos_cur ; ... | 255 movwf menu_pos_cur ; ... |
256 | 256 |
257 MENU_BEGIN_DIVE .3 | 257 MENU_BEGIN_DIVE tDivemenu_Marker, .3 |
258 MENU_CALL tDivemenu_ResetAvg, do_reset_average | 258 MENU_CALL tDivemenu_ResetAvg, do_reset_average |
259 MENU_CALL tDivemenu_Marker, do_set_marker | 259 MENU_CALL tDivemenu_Marker, do_set_marker |
260 MENU_CALL tBack, do_return_main_divemenu ; return to main menu | 260 MENU_CALL tBack, do_return_main_divemenu ; return to main menu |
261 MENU_END | 261 MENU_END |
262 | 262 |
301 btfsc WREG,7 ; best gas/dil number >= 128 (not computed yet) ? | 301 btfsc WREG,7 ; best gas/dil number >= 128 (not computed yet) ? |
302 movlw .1 ; YES - default to first gas/dil | 302 movlw .1 ; YES - default to first gas/dil |
303 do_divemode_gaslist_1: | 303 do_divemode_gaslist_1: |
304 movwf menu_pos_cur ; position cursor to best gas/dil (or first option if none avail) | 304 movwf menu_pos_cur ; position cursor to best gas/dil (or first option if none avail) |
305 | 305 |
306 MENU_BEGIN_DIVE .6 | 306 MENU_BEGIN_DIVE tDivemenu_Gaslist, .6 |
307 MENU_DYNAMIC dyn_strcat_gas_prodl, do_switch_gas | 307 MENU_DYNAMIC dyn_strcat_gas_prodl, do_switch_gas |
308 MENU_DYNAMIC dyn_strcat_gas_prodl, do_switch_gas | 308 MENU_DYNAMIC dyn_strcat_gas_prodl, do_switch_gas |
309 MENU_DYNAMIC dyn_strcat_gas_prodl, do_switch_gas | 309 MENU_DYNAMIC dyn_strcat_gas_prodl, do_switch_gas |
310 MENU_DYNAMIC dyn_strcat_gas_prodl, do_switch_gas | 310 MENU_DYNAMIC dyn_strcat_gas_prodl, do_switch_gas |
311 MENU_DYNAMIC dyn_strcat_gas_prodl, do_switch_gas | 311 MENU_DYNAMIC dyn_strcat_gas_prodl, do_switch_gas |
365 do_lost_gas_common: | 365 do_lost_gas_common: |
366 bsf short_gas_descriptions ; do not show "Gas x" etc. | 366 bsf short_gas_descriptions ; do not show "Gas x" etc. |
367 bcf better_gas_hint ; do not mark the best gas/diluent | 367 bcf better_gas_hint ; do not mark the best gas/diluent |
368 bcf color_code_gases ; do not color-code the gases/diluents by their ppO2 | 368 bcf color_code_gases ; do not color-code the gases/diluents by their ppO2 |
369 | 369 |
370 MENU_BEGIN_DIVE .6 | 370 MENU_BEGIN_DIVE tDivemenu_LostGas, .6 |
371 MENU_DYNAMIC dyn_strcat_gas_prodl, do_toggle_staged_lost | 371 MENU_DYNAMIC dyn_strcat_gas_prodl, do_toggle_staged_lost |
372 MENU_DYNAMIC dyn_strcat_gas_prodl, do_toggle_staged_lost | 372 MENU_DYNAMIC dyn_strcat_gas_prodl, do_toggle_staged_lost |
373 MENU_DYNAMIC dyn_strcat_gas_prodl, do_toggle_staged_lost | 373 MENU_DYNAMIC dyn_strcat_gas_prodl, do_toggle_staged_lost |
374 MENU_DYNAMIC dyn_strcat_gas_prodl, do_toggle_staged_lost | 374 MENU_DYNAMIC dyn_strcat_gas_prodl, do_toggle_staged_lost |
375 MENU_DYNAMIC dyn_strcat_gas_prodl, do_toggle_staged_lost | 375 MENU_DYNAMIC dyn_strcat_gas_prodl, do_toggle_staged_lost |
471 ENDIF ; _helium | 471 ENDIF ; _helium |
472 bsf block_option_value ; suspend displaying of option values | 472 bsf block_option_value ; suspend displaying of option values |
473 | 473 |
474 | 474 |
475 IFDEF _helium | 475 IFDEF _helium |
476 MENU_BEGIN_DIVE .6 | 476 MENU_BEGIN_DIVE tGas6, .6 |
477 MENU_OPT_INCS tO2Plus, oGas6O2 | 477 MENU_OPT_INCS tO2Plus, oGas6O2 |
478 MENU_OPT_DECS tO2Minus, oGas6O2 | 478 MENU_OPT_DECS tO2Minus, oGas6O2 |
479 MENU_OPT_INCS tHePlus, oGas6He | 479 MENU_OPT_INCS tHePlus, oGas6He |
480 MENU_OPT_DECS tHeMinus, oGas6He | 480 MENU_OPT_DECS tHeMinus, oGas6He |
481 MENU_DYNAMIC dyn_show_gas6, do_gas6_switch | 481 MENU_DYNAMIC dyn_show_gas6, do_gas6_switch |
482 MENU_CALL tExit, do_exit_divemode_menu | 482 MENU_CALL tExit, do_exit_divemode_menu |
483 MENU_END | 483 MENU_END |
484 ELSE | 484 ELSE |
485 MENU_BEGIN_DIVE .4 | 485 MENU_BEGIN_DIVE tGas6, .4 |
486 MENU_OPT_INCS tO2Plus, oGas6O2 | 486 MENU_OPT_INCS tO2Plus, oGas6O2 |
487 MENU_OPT_DECS tO2Minus, oGas6O2 | 487 MENU_OPT_DECS tO2Minus, oGas6O2 |
488 MENU_DYNAMIC dyn_show_gas6, do_gas6_switch | 488 MENU_DYNAMIC dyn_show_gas6, do_gas6_switch |
489 MENU_CALL tExit, do_exit_divemode_menu | 489 MENU_CALL tExit, do_exit_divemode_menu |
490 MENU_END | 490 MENU_END |
539 btfsc ext_input_optical ; do we have an optical input (OSTC 3)? | 539 btfsc ext_input_optical ; do we have an optical input (OSTC 3)? |
540 bra do_divemode_splist_sensor ; YES | 540 bra do_divemode_splist_sensor ; YES |
541 ENDIF ; _external_sensor | 541 ENDIF ; _external_sensor |
542 | 542 |
543 do_divemode_splist_no_sensor: | 543 do_divemode_splist_no_sensor: |
544 MENU_BEGIN_DIVE .6 | 544 MENU_BEGIN_DIVE tFixedSetpoints, .6 |
545 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp | 545 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp |
546 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp | 546 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp |
547 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp | 547 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp |
548 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp | 548 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp |
549 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp | 549 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp |
552 | 552 |
553 | 553 |
554 IFDEF _external_sensor | 554 IFDEF _external_sensor |
555 | 555 |
556 do_divemode_splist_sensor: | 556 do_divemode_splist_sensor: |
557 MENU_BEGIN_DIVE .6 | 557 MENU_BEGIN_DIVE tFixedSetpoints, .6 |
558 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp | 558 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp |
559 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp | 559 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp |
560 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp | 560 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp |
561 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp | 561 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp |
562 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp | 562 MENU_DYNAMIC dyn_strcat_setpoint_prodl, do_switch_sp |
640 call dive_customview_callup ; call-up the custom view | 640 call dive_customview_callup ; call-up the custom view |
641 movlw .1 ; set to 1st option: use sensors | 641 movlw .1 ; set to 1st option: use sensors |
642 movwf menu_pos_cur ; ... | 642 movwf menu_pos_cur ; ... |
643 | 643 |
644 do_return_divemode_common: | 644 do_return_divemode_common: |
645 MENU_BEGIN_DIVE .6 | 645 MENU_BEGIN_DIVE tDivemenu_UseSensor,.6 |
646 MENU_CALL tDivemenu_UseSensor, do_switch_sensor | 646 MENU_CALL tDivemenu_UseSensor, do_switch_sensor |
647 MENU_CALL tBack, do_divemode_splist | 647 MENU_CALL tBack, do_divemode_splist |
648 MENU_CALL tExit, do_exit_divemode_menu | 648 MENU_CALL tExit, do_exit_divemode_menu |
649 MENU_CALL tDiveHudMask1, do_toggle_sensor | 649 MENU_CALL tDiveHudMask1, do_toggle_sensor |
650 MENU_CALL tDiveHudMask2, do_toggle_sensor | 650 MENU_CALL tDiveHudMask2, do_toggle_sensor |
653 | 653 |
654 do_divemode_setpoint_pscr: | 654 do_divemode_setpoint_pscr: |
655 movlw .1 | 655 movlw .1 |
656 movwf menu_pos_cur ; set to 1st option: use calculated ppO2 | 656 movwf menu_pos_cur ; set to 1st option: use calculated ppO2 |
657 | 657 |
658 MENU_BEGIN_DIVE .6 | 658 MENU_BEGIN_DIVE tDivemenu_UseSensor,.6 |
659 MENU_CALL tCalculated, do_switch_sp_calc | 659 MENU_CALL tCalculated, do_switch_sp_calc |
660 MENU_CALL tDivemenu_UseSensor, do_switch_sensor | 660 MENU_CALL tDivemenu_UseSensor, do_switch_sensor |
661 MENU_CALL tExit, do_exit_divemode_menu | 661 MENU_CALL tExit, do_exit_divemode_menu |
662 MENU_CALL tDiveHudMask1, do_toggle_sensor | 662 MENU_CALL tDiveHudMask1, do_toggle_sensor |
663 MENU_CALL tDiveHudMask2, do_toggle_sensor | 663 MENU_CALL tDiveHudMask2, do_toggle_sensor |
733 do_main_cavemenu_common: | 733 do_main_cavemenu_common: |
734 movlw index_cave_waypoints ; get number of cave waypoints custom view | 734 movlw index_cave_waypoints ; get number of cave waypoints custom view |
735 movwf active_customview ; set custom view number | 735 movwf active_customview ; set custom view number |
736 call dive_customview_callup ; draw custom view | 736 call dive_customview_callup ; draw custom view |
737 | 737 |
738 MENU_BEGIN_DIVE .6 | 738 MENU_BEGIN_DIVE tCaveMode, .6 |
739 MENU_DYNAMIC dyn_waypoint_set, do_waypoint_set ; 1 | 739 MENU_DYNAMIC dyn_waypoint_set, do_waypoint_set ; 1 |
740 MENU_DYNAMIC dyn_turndive_toggle, do_turndive_toggle ; 2 | 740 MENU_DYNAMIC dyn_turndive_toggle, do_turndive_toggle ; 2 |
741 MENU_CALL tDivemenu_off_on, do_cavemode_toggle ; 3 | 741 MENU_CALL tDivemenu_off_on, do_cavemode_toggle ; 3 |
742 MENU_DYNAMIC dyn_waypoint_out, do_waypoint_out ; 4 | 742 MENU_DYNAMIC dyn_waypoint_out, do_waypoint_out ; 4 |
743 MENU_DYNAMIC dyn_waypoint_in, do_waypoint_in ; 5 | 743 MENU_DYNAMIC dyn_waypoint_in, do_waypoint_in ; 5 |