comparison code_part1/OSTC_code_asm_part1/divemode_menu.asm @ 663:64194a3c8d5b

Restart building decoplan after gas change
author heinrichsweikamp
date Mon, 12 Nov 2012 20:53:58 +0100
parents e6ac142e82b0
children 259e4c1bf3c2
comparison
equal deleted inserted replaced
662:6ac917ad5226 663:64194a3c8d5b
582 subfwb wait_temp,W ; minus He 582 subfwb wait_temp,W ; minus He
583 subfwb EEDATA,F ; minus O2 583 subfwb EEDATA,F ; minus O2
584 movff EEDATA, char_I_N2_ratio ; = N2! 584 movff EEDATA, char_I_N2_ratio ; = N2!
585 bsf manual_gas_changed ; set event flag 585 bsf manual_gas_changed ; set event flag
586 bsf event_occured ; set global event flag 586 bsf event_occured ; set global event flag
587 clrf WREG
588 movff WREG,char_O_deco_status ; Restart decoplan computation mH
587 bsf is_bailout ;=1: CC mode, but bailout active! 589 bsf is_bailout ;=1: CC mode, but bailout active!
588 clrf lo ; clear Setpoint, PLED_const_ppO2_value now displayes "Bail" 590 clrf lo ; clear Setpoint, PLED_const_ppO2_value now displayes "Bail"
589 movff lo,char_I_const_ppO2 591 movff lo,char_I_const_ppO2
590 movlw 6 592 movlw 6
591 movff WREG,char_I_current_gas ; Current gas is Gas6 (manual setting). 593 movff WREG,char_I_current_gas ; Current gas is Gas6 (manual setting).
696 698
697 divemenu_set_gas1a: 699 divemenu_set_gas1a:
698 bcf display_set_setpoint ; Clear Display Flag 700 bcf display_set_setpoint ; Clear Display Flag
699 bsf stored_gas_changed ; set event flag 701 bsf stored_gas_changed ; set event flag
700 bsf event_occured ; set global event flag 702 bsf event_occured ; set global event flag
703 clrf WREG
704 movff WREG,char_O_deco_status ; Restart decoplan computation mH
701 bra timeout_divemenu2 ; quit menu! 705 bra timeout_divemenu2 ; quit menu!
702 706
703 divemenu_set_gas2a: 707 divemenu_set_gas2a:
704 movlw d'6' 708 movlw d'6'
705 cpfseq menupos ; At the "Gas 6.." position? 709 cpfseq menupos ; At the "Gas 6.." position?
734 subfwb wait_temp,W ; minus He 738 subfwb wait_temp,W ; minus He
735 subfwb EEDATA,F ; minus O2 739 subfwb EEDATA,F ; minus O2
736 movff EEDATA, char_I_N2_ratio ; = N2! 740 movff EEDATA, char_I_N2_ratio ; = N2!
737 bsf stored_gas_changed ; set event flag 741 bsf stored_gas_changed ; set event flag
738 bsf event_occured ; set global event flag 742 bsf event_occured ; set global event flag
743 clrf WREG
744 movff WREG,char_O_deco_status ; Restart decoplan computation mH
739 745
740 movff menupos,char_I_current_gas ; Inform deco code too. 746 movff menupos,char_I_current_gas ; Inform deco code too.
741 bra timeout_divemenu2 ; quit menu! 747 bra timeout_divemenu2 ; quit menu!
742 748
743 timeout_divemenu: 749 timeout_divemenu: