comparison code_part1/OSTC_code_asm_part1/divemode_menu.asm @ 730:ae641bcb0d02

store a bailout event in the logbook
author heinrichsweikamp
date Sun, 16 Jun 2013 16:09:02 +0200
parents b5ffde7e569e
children 65822fa08333
comparison
equal deleted inserted replaced
729:71e88ee8bbf2 730:ae641bcb0d02
617 bsf manual_gas_changed ; set event flag 617 bsf manual_gas_changed ; set event flag
618 bsf event_occured ; set global event flag 618 bsf event_occured ; set global event flag
619 bsf decoplan_invalid ; The decoplan needs to updated 619 bsf decoplan_invalid ; The decoplan needs to updated
620 clrf WREG 620 clrf WREG
621 movff WREG,char_O_deco_status ; Restart decoplan computation mH 621 movff WREG,char_O_deco_status ; Restart decoplan computation mH
622 bsf is_bailout ;=1: CC mode, but bailout active! 622 bsf is_bailout ;=1: CC mode, but bailout active!
623 bsf store_bailout_event
623 clrf lo ; clear Setpoint, DISP_const_ppO2_value now displayes "Bail" 624 clrf lo ; clear Setpoint, DISP_const_ppO2_value now displayes "Bail"
624 movff lo,char_I_const_ppO2 625 movff lo,char_I_const_ppO2
625 movlw 6 626 movlw 6
626 movff WREG,char_I_current_gas ; Current gas is Gas6 (manual setting). 627 movff WREG,char_I_current_gas ; Current gas is Gas6 (manual setting).
627 bra timeout_divemenu2 ; quit underwater menu! 628 bra timeout_divemenu2 ; quit underwater menu!
743 cpfseq menupos ; At the "Gas 6.." position? 744 cpfseq menupos ; At the "Gas 6.." position?
744 bra divemenu_set_gas2b ; No, select Gas1-5 (Stored in Menupos) 745 bra divemenu_set_gas2b ; No, select Gas1-5 (Stored in Menupos)
745 bra divemode_set_xgas ; Configure the extra gas 746 bra divemode_set_xgas ; Configure the extra gas
746 747
747 divemenu_set_gas2b: 748 divemenu_set_gas2b:
748 bsf is_bailout ;=1: CC mode, but bailout active! 749 bsf is_bailout ;=1: CC mode, but bailout active!
750 bsf store_bailout_event
751 bsf event_occured ; set global event flag
749 clrf lo ; clear Setpoint, DISP_const_ppO2_value now displayes "Bail" 752 clrf lo ; clear Setpoint, DISP_const_ppO2_value now displayes "Bail"
750 movff lo,char_I_const_ppO2 753 movff lo,char_I_const_ppO2
751 754
752 bcf display_set_gas ; clear flag 755 bcf display_set_gas ; clear flag
753 movff menupos,active_gas ; copy into active gas register 756 movff menupos,active_gas ; copy into active gas register