Mercurial > public > hwos_code
comparison src/divemenu_tree.asm @ 511:7db10ebae205
BUGFIX: Lost Diluent now possible in CCR and PSCR mode
author | heinrichsweikamp |
---|---|
date | Tue, 04 Jul 2017 16:12:53 +0200 |
parents | 0910c227018f |
children | 4921aa796691 |
comparison
equal
deleted
inserted
replaced
510:377d958252fb | 511:7db10ebae205 |
---|---|
187 | 187 |
188 do_lost_gas: | 188 do_lost_gas: |
189 movlw .1 | 189 movlw .1 |
190 movwf menupos ; Set to first option in divemode menu | 190 movwf menupos ; Set to first option in divemode menu |
191 do_lost_gas0: | 191 do_lost_gas0: |
192 bcf ccr_diluent_setup ; use OC gases | 192 ; bcf ccr_diluent_setup ; use OC gases |
193 bsf is_bailout_menu ; =1: Bailout | 193 ; bsf is_bailout_menu ; =1: Bailout |
194 bsf short_gas_decriptions | 194 bsf short_gas_decriptions |
195 MENU_BEGIN tDivemenu_LostGas, .6 | 195 MENU_BEGIN tDivemenu_LostGas, .6 |
196 MENU_DYNAMIC gaslist_strcat_gas_mod, do_toggle_active ; Toggle the gas (in)active | 196 MENU_DYNAMIC gaslist_strcat_gas_mod, do_toggle_active ; Toggle the gas (in)active |
197 MENU_DYNAMIC gaslist_strcat_gas_mod, do_toggle_active ; Toggle the gas (in)active | 197 MENU_DYNAMIC gaslist_strcat_gas_mod, do_toggle_active ; Toggle the gas (in)active |
198 MENU_DYNAMIC gaslist_strcat_gas_mod, do_toggle_active ; Toggle the gas (in)active | 198 MENU_DYNAMIC gaslist_strcat_gas_mod, do_toggle_active ; Toggle the gas (in)active |
200 MENU_DYNAMIC gaslist_strcat_gas_mod, do_toggle_active ; Toggle the gas (in)active | 200 MENU_DYNAMIC gaslist_strcat_gas_mod, do_toggle_active ; Toggle the gas (in)active |
201 MENU_CALL tExit, do_exit_divemode_menu | 201 MENU_CALL tExit, do_exit_divemode_menu |
202 MENU_END | 202 MENU_END |
203 | 203 |
204 do_toggle_active: | 204 do_toggle_active: |
205 movlw .5 | |
206 btfsc ccr_diluent_setup ; use OC gases | |
207 addwf menupos,F ; -> 6-10 for Diluents | |
208 | |
205 decf menupos,W ; 1-5 -> 0-4 | 209 decf menupos,W ; 1-5 -> 0-4 |
206 lfsr FSR1,opt_gas_type+0 | 210 lfsr FSR1,opt_gas_type+0 |
207 movff PLUSW1,lo | 211 movff PLUSW1,lo |
208 tstfsz lo ; Already disabled? | 212 tstfsz lo ; Already disabled? |
209 bra do_toggle_active2 ; No, disable now! | 213 bra do_toggle_active2 ; No, disable now! |
222 movff PLUSW1,lo | 226 movff PLUSW1,lo |
223 decf menupos,W ; 1-5 -> 0-4 | 227 decf menupos,W ; 1-5 -> 0-4 |
224 lfsr FSR1,opt_OC_bail_gas_change+0 | 228 lfsr FSR1,opt_OC_bail_gas_change+0 |
225 movff lo,PLUSW1 | 229 movff lo,PLUSW1 |
226 | 230 |
231 movlw .5 | |
232 btfsc ccr_diluent_setup ; use OC gases? | |
233 subwf menupos,F ; Back to 1-5 | |
234 | |
227 bra do_lost_gas0 ; Return to list and show updated result | 235 bra do_lost_gas0 ; Return to list and show updated result |
228 | 236 |
229 do_toggle_active2: | 237 do_toggle_active2: |
230 clrf PLUSW1 ; 0=Disabled, 1=First, 2=Travel, 3=Deco | 238 clrf PLUSW1 ; 0=Disabled, 1=First, 2=Travel, 3=Deco |
231 | 239 |
232 ; Also delete change depth here to have the menu updated immediately | 240 ; Also delete change depth here to have the menu updated immediately |
233 lfsr FSR1,opt_OC_bail_gas_change+0 | 241 lfsr FSR1,opt_OC_bail_gas_change+0 |
234 clrf PLUSW1 | 242 clrf PLUSW1 |
235 | 243 |
244 movlw .5 | |
245 btfsc ccr_diluent_setup ; use OC gases? | |
246 subwf menupos,F ; Back to 1-5 | |
247 | |
236 bra do_lost_gas0 ; Return to list and show updated result | 248 bra do_lost_gas0 ; Return to list and show updated result |
237 | 249 |
238 do_dive_pO2: | 250 do_dive_pO2: |
239 banksel char_I_O2_ratio | 251 banksel char_I_O2_ratio |
240 incf char_I_O2_ratio,F ; O2++ | 252 incf char_I_O2_ratio,F ; O2++ |