Mercurial > public > hwos_code
comparison src/divemenu_tree.asm @ 578:2b8ef780cfa8
work in progress...
author | heinrichsweikamp |
---|---|
date | Sun, 18 Feb 2018 21:04:54 +0100 |
parents | 54346c651b6a |
children | e6d5a1f02daf |
comparison
equal
deleted
inserted
replaced
577:bfb87b4cf2ca | 578:2b8ef780cfa8 |
---|---|
179 bcf ccr_diluent_setup ; switch to OC gases | 179 bcf ccr_diluent_setup ; switch to OC gases |
180 bsf is_bailout_menu ; flag it is a bailout action | 180 bsf is_bailout_menu ; flag it is a bailout action |
181 do_divemode_gaslist: ; entry point for switching: OC -> gases, loop -> diluents | 181 do_divemode_gaslist: ; entry point for switching: OC -> gases, loop -> diluents |
182 btfsc is_bailout ; in bailout mode? | 182 btfsc is_bailout ; in bailout mode? |
183 bcf ccr_diluent_setup ; yes - for safety reasons, redirect to OC (bailout) gases | 183 bcf ccr_diluent_setup ; yes - for safety reasons, redirect to OC (bailout) gases |
184 do_divemode_gaslist_com: | |
185 bsf short_gas_decriptions | 184 bsf short_gas_decriptions |
186 movlw .1 | 185 movlw .1 |
187 movwf menupos ; Set to first option in divemode menu | 186 movwf menupos ; Set to first option in divemode menu |
188 MENU_BEGIN tGaslist, .6 | 187 MENU_BEGIN tGaslist, .6 |
189 MENU_DYNAMIC gaslist_strcat_gas_mod, do_switch_gas | 188 MENU_DYNAMIC gaslist_strcat_gas_mod, do_switch_gas |
250 do_toggle_active: | 249 do_toggle_active: |
251 extern restart_deco_engine_wo_ceiling | 250 extern restart_deco_engine_wo_ceiling |
252 call restart_deco_engine_wo_ceiling | 251 call restart_deco_engine_wo_ceiling |
253 movlw .5 | 252 movlw .5 |
254 btfsc ccr_diluent_setup ; diluents? | 253 btfsc ccr_diluent_setup ; diluents? |
255 addwf menupos,F ; yes 1-5 -> 6-10 | 254 addwf menupos,F ; yes 1-5 -> 6-10 |
256 decf menupos,W ; -> 0-4 for gases / 5-9 for diluents | 255 decf menupos,W ; -> 0-4 for gases / 5-9 for diluents |
257 lfsr FSR1,opt_gas_type+0 | 256 lfsr FSR1,opt_gas_type+0 |
258 movff PLUSW1,lo | 257 movff PLUSW1,lo |
259 tstfsz lo ; Already disabled? | 258 tstfsz lo ; Already disabled? |
260 bra do_toggle_active2 ; No, disable now! | 259 bra do_toggle_active2 ; No, disable now! |
261 lfsr FSR1,opt_gas_type_backup+0 ; copy opt_gas_type_backup+W back to opt_gas_type+W | 260 lfsr FSR1,opt_gas_type_backup+0 ; copy opt_gas_type_backup+W back to opt_gas_type+W |
262 movff PLUSW1,lo | 261 movff PLUSW1,lo |
263 lfsr FSR1,opt_gas_type+0 | 262 lfsr FSR1,opt_gas_type+0 |
264 movff lo,PLUSW1 | 263 movff lo,PLUSW1 |
264 ; btfsc ccr_diluent_setup ; diluents? | |
265 ; bra do_toggle_active3 ; Yes, ignore restoring change depth (Work-around for potential issue) mH | |
265 lfsr FSR1,opt_OC_bail_gas_change_backup+0 ; copy opt_OC_bail_gas_change_backup+W back to opt_OC_bail_gas_change+W | 266 lfsr FSR1,opt_OC_bail_gas_change_backup+0 ; copy opt_OC_bail_gas_change_backup+W back to opt_OC_bail_gas_change+W |
266 movff PLUSW1,lo | 267 movff PLUSW1,lo |
267 lfsr FSR1,opt_OC_bail_gas_change+0 | 268 lfsr FSR1,opt_OC_bail_gas_change+0 |
268 movff lo,PLUSW1 | 269 movff lo,PLUSW1 |
269 bra do_toggle_active3 | 270 bra do_toggle_active3 |
270 do_toggle_active2: | 271 do_toggle_active2: |
271 clrf PLUSW1 ; 0=Disabled, 1=First, 2=Travel, 3=Deco | 272 ; btfsc ccr_diluent_setup ; diluents? |
273 ; bra do_toggle_active3 ; Yes, ignore restoring change depth (Work-around for potential issue) mH | |
274 clrf PLUSW1 ; 0=Disabled, 1=First, 2=Travel, 3=Deco | |
272 lfsr FSR1,opt_OC_bail_gas_change+0 | 275 lfsr FSR1,opt_OC_bail_gas_change+0 |
273 clrf PLUSW1 ; also delete change depth here to have the menu updated immediately | 276 clrf PLUSW1 ; also delete change depth here to have the menu updated immediately |
274 do_toggle_active3: | 277 do_toggle_active3: |
275 movlw .5 | 278 movlw .5 |
276 btfsc ccr_diluent_setup ; use OC gases? | 279 btfsc ccr_diluent_setup ; use OC gases? |
277 subwf menupos,F ; Back to 1-5 | 280 subwf menupos,F ; Back to 1-5 |
278 bra do_lost_gas_loop ; Return to list and show updated result | 281 bra do_lost_gas_loop ; Return to list and show updated result |
279 | 282 |
280 | 283 |
281 do_dive_pO2: | 284 do_dive_pO2: |
282 banksel gas6_O2_ratio | 285 banksel gas6_O2_ratio |