Mercurial > public > hwos_code
comparison src/divemenu_tree.asm @ 485:18e047102e49
3.14 BETA release
author | heinrichsweikamp |
---|---|
date | Mon, 20 Feb 2017 15:49:38 +0100 |
parents | 23b58c4bc6aa |
children | 0910c227018f |
comparison
equal
deleted
inserted
replaced
484:ff2994528e02 | 485:18e047102e49 |
---|---|
28 call menu_processor_pop ; drop exit line. | 28 call menu_processor_pop ; drop exit line. |
29 call menu_processor_pop ; drop exit line. | 29 call menu_processor_pop ; drop exit line. |
30 | 30 |
31 btfsc FLAG_ccr_mode | 31 btfsc FLAG_ccr_mode |
32 bra main_divemenu_ccr ; CCR Menu | 32 bra main_divemenu_ccr ; CCR Menu |
33 | 33 |
34 bcf ccr_diluent_setup ; For OC gases | 34 btfsc FLAG_pscr_mode |
35 bra main_divemenu_ccr ; Proceeds to PSCR menu then... | |
36 | |
37 bcf ccr_diluent_setup ; For OC gases | |
35 bcf is_bailout_menu | 38 bcf is_bailout_menu |
36 movlw .1 | 39 movlw .1 |
37 movwf menupos ; Set to first option in divemode menu | 40 movwf menupos ; Set to first option in divemode menu |
38 MENU_BEGIN tMainMenu, .5 | 41 MENU_BEGIN tMainMenu, .5 |
39 MENU_CALL tDivemenu_Gaslist, do_divemode_gaslist | 42 MENU_CALL tDivemenu_Gaslist, do_divemode_gaslist |
51 | 54 |
52 main_divemenu_ccr: | 55 main_divemenu_ccr: |
53 bsf ccr_diluent_setup ; For diluents | 56 bsf ccr_diluent_setup ; For diluents |
54 movlw .1 | 57 movlw .1 |
55 movwf menupos ; Set to first option in divemode menu | 58 movwf menupos ; Set to first option in divemode menu |
59 | |
60 btfsc FLAG_pscr_mode | |
61 bra main_divemenu_pscr ; PSCR Menu | |
62 | |
56 MENU_BEGIN tMainMenu, .6 | 63 MENU_BEGIN tMainMenu, .6 |
57 MENU_CALL tDiveBailout, do_divemode_gaslist_bail | 64 MENU_CALL tDiveBailout, do_divemode_gaslist_bail |
58 MENU_CALL tDivemenu_Setpoint, do_divemode_splist | 65 MENU_CALL tDivemenu_Setpoint, do_divemode_splist |
59 MENU_CALL tDivemenu_Gaslist, do_divemode_gaslist | 66 MENU_CALL tDivemenu_Gaslist, do_divemode_gaslist |
60 MENU_CALL tDivemenu_ResetAvg, do_divemode_resetavg | 67 MENU_CALL tDivemenu_ResetAvg, do_divemode_resetavg |
61 MENU_CALL tDivemenu_ToggleGF, do_divemode_togglegf | 68 MENU_CALL tDivemenu_ToggleGF, do_divemode_togglegf |
62 MENU_CALL tExit, do_exit_divemode_menu | 69 MENU_CALL tExit, do_exit_divemode_menu |
63 MENU_END | 70 MENU_END |
64 | 71 |
65 | 72 main_divemenu_pscr: |
73 MENU_BEGIN tMainMenu, .6 | |
74 MENU_CALL tDiveBailout, do_divemode_gaslist_bail | |
75 MENU_CALL tDivemenu_Gaslist, do_divemode_gaslist_pscr ; quit bailout and always use diluents here | |
76 MENU_CALL tDivemenu_ResetAvg, do_divemode_resetavg | |
77 MENU_CALL tDivemenu_ToggleGF, do_divemode_togglegf | |
78 MENU_CALL tDivemenu_Marker, do_set_marker | |
79 MENU_CALL tExit, do_exit_divemode_menu | |
80 MENU_END | |
81 | |
66 do_togglegf: | 82 do_togglegf: |
67 TSTOSS opt_enable_aGF ; =1: aGF can be selected underwater | 83 TSTOSS opt_enable_aGF ; =1: aGF can be selected underwater |
68 bra do_exit_divemode_menu ; exit | 84 bra do_exit_divemode_menu ; exit |
69 bsf toggle_gf ; Set flag... | 85 bsf toggle_gf ; Set flag... |
70 bra do_exit_divemode_menu ; ...and exit | 86 bra do_exit_divemode_menu ; ...and exit |
125 | 141 |
126 do_switch_sp2: | 142 do_switch_sp2: |
127 ; Clear some flags in case we were in bailout before... | 143 ; Clear some flags in case we were in bailout before... |
128 bcf is_bailout ; =1: Bailout | 144 bcf is_bailout ; =1: Bailout |
129 bcf is_bailout_menu ; | 145 bcf is_bailout_menu ; |
130 bcf better_gas_available ;=1: A better gas is available and a gas change is advised in divemode | 146 bcf better_gas_available ;=1: A better gas is available and a gas change is advised in divemode |
131 bcf blinking_better_gas ; Clear blinking flag | 147 bcf blinking_better_gas ; Clear blinking flag |
132 bra do_exit_divemode_menu ; And exit | 148 bra do_exit_divemode_menu ; And exit |
133 | 149 |
150 do_divemode_gaslist_pscr: | |
151 bcf is_bailout ; =1: Bailout | |
152 bcf is_bailout_menu ; | |
153 bra do_divemode_gaslist_pscr2 | |
154 | |
134 do_divemode_gaslist_bail: | 155 do_divemode_gaslist_bail: |
135 bcf ccr_diluent_setup ; For OC gases | 156 bcf ccr_diluent_setup ; For OC gases |
136 bsf is_bailout_menu ; =1: Bailout | 157 bsf is_bailout_menu ; =1: Bailout |
137 do_divemode_gaslist: | 158 do_divemode_gaslist: |
138 btfsc is_bailout ; In Bailout case? | 159 btfsc is_bailout ; In Bailout case? |
139 bcf ccr_diluent_setup ; Yes, use OC gases | 160 bcf ccr_diluent_setup ; Yes, use OC gases |
161 do_divemode_gaslist_pscr2: | |
140 bsf short_gas_decriptions | 162 bsf short_gas_decriptions |
141 movlw .1 | 163 movlw .1 |
142 movwf menupos ; Set to first option in divemode menu | 164 movwf menupos ; Set to first option in divemode menu |
143 MENU_BEGIN tGaslist, .6 | 165 MENU_BEGIN tGaslist, .6 |
144 MENU_DYNAMIC gaslist_strcat_gas_mod, do_switch_gas | 166 MENU_DYNAMIC gaslist_strcat_gas_mod, do_switch_gas |