comparison code_part1/OSTC_code_asm_part1/divemode_menu.asm @ 685:aebb6d039249

Use 4byte in EEPROM for diluents (Same as OC gases) Show active gas indicator below first gas in surfacemode
author heinrichsweikamp
date Sat, 26 Jan 2013 14:11:07 +0100
parents 6e456a6398e0
children 03f8a8eec9ae b5ffde7e569e
comparison
equal deleted inserted replaced
684:99b3fb0ab4c7 685:aebb6d039249
705 bsf setpoint_changed 705 bsf setpoint_changed
706 bsf event_occured ; set global event flag 706 bsf event_occured ; set global event flag
707 707
708 divemenu_set_gas1d: ; (Re-)Set Diluent 708 divemenu_set_gas1d: ; (Re-)Set Diluent
709 decf active_diluent,W ; 0-4 -> WREG mH 709 decf active_diluent,W ; 0-4 -> WREG mH
710 mullw .2 710 mullw .4
711 movf PRODL,W 711 movf PRODL,W
712 addlw d'97' 712 addlw d'98'
713 movwf EEADR 713 movwf EEADR
714 call read_eeprom ; Read He 714 call read_eeprom ; Read He
715 movff EEDATA,char_I_He_ratio ; And copy into hold register 715 movff EEDATA,char_I_He_ratio ; And copy into hold register
716 decf active_diluent,W ; 0-4 -> WREG 716 decf active_diluent,W ; 0-4 -> WREG
717 mullw .2 717 mullw .4
718 movf PRODL,W 718 movf PRODL,W
719 addlw d'96' 719 addlw d'97'
720 movwf EEADR 720 movwf EEADR
721 call read_eeprom ; Read O2 721 call read_eeprom ; Read O2
722 movff EEDATA, char_I_O2_ratio ; O2 ratio 722 movff EEDATA, char_I_O2_ratio ; O2 ratio
723 movff char_I_He_ratio, wait_temp ; copy into bank1 register 723 movff char_I_He_ratio, wait_temp ; copy into bank1 register
724 bsf STATUS,C ; Borrow bit 724 bsf STATUS,C ; Borrow bit