Mercurial > public > mk2
diff code_part1/OSTC_code_asm_part1/divemode_menu.asm @ 353:b5b030c1ae7e
Avoid spurious switch-depth stops with 3 or more gas.
author | JeanDo |
---|---|
date | Tue, 07 Jun 2011 01:16:55 +0200 |
parents | 6bdf80d7276c |
children | 88660a400338 |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/divemode_menu.asm Mon May 30 19:28:59 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/divemode_menu.asm Tue Jun 07 01:16:55 2011 +0200 @@ -560,7 +560,9 @@ bsf event_occured ; set global event flag bsf is_bailout ;=1: CC mode, but bailout active! clrf lo ; clear Setpoint, PLED_const_ppO2_value now displayes "Bail" - movff lo,char_I_const_ppO2 + movff lo,char_I_const_ppO2 + movlw 6 + movff WREG,char_I_current_gas ; Current gas is Gas6 (manual setting). bra timeout_divemenu2 ; quit underwater menu! divemenu_set_gas: @@ -627,6 +629,7 @@ cpfseq menupos ; At the "Gas 6.." position? bra divemenu_set_gas2b ; No, select Gas1-5 (Stored in Menupos) bra divemode_set_xgas ; Configure the extra gas + divemenu_set_gas2b: bsf is_bailout ;=1: CC mode, but bailout active! clrf lo ; clear Setpoint, PLED_const_ppO2_value now displayes "Bail" @@ -657,6 +660,8 @@ movff EEDATA, char_I_N2_ratio ; = N2! bsf stored_gas_changed ; set event flag bsf event_occured ; set global event flag + + movff menupos,char_I_current_gas ; Inform deco code too. bra timeout_divemenu2 ; quit menu! timeout_divemenu: