comparison src/divemode.asm @ 137:28b057aa9f75

Simplify gas change
author heinrichsweikamp
date Thu, 17 Jul 2014 14:24:51 +0200
parents 4574aed5cd4c
children 2852b0bd6391
comparison
equal deleted inserted replaced
136:9a637c9bb19a 137:28b057aa9f75
826 bcf switch_right 826 bcf switch_right
827 movlw divemode_menuview_timeout 827 movlw divemode_menuview_timeout
828 movwf timeout_counter3 ; Reload timeout 828 movwf timeout_counter3 ; Reload timeout
829 movff menupos2,WREG ; Menupos3 holds number of customview/divemode menu function 829 movff menupos2,WREG ; Menupos3 holds number of customview/divemode menu function
830 dcfsnz WREG,F 830 dcfsnz WREG,F
831 bra divemode_option_gaschange ; Switch to the indicated "better gas"
832 dcfsnz WREG,F
831 bra divemode_option0 ; Start/Setup Divemode menu 833 bra divemode_option0 ; Start/Setup Divemode menu
832 dcfsnz WREG,F 834 dcfsnz WREG,F
833 bra divemode_option1 ; Quit Simulation? 835 bra divemode_option1 ; Quit Simulation?
834 dcfsnz WREG,F 836 dcfsnz WREG,F
835 bra divemode_option2 ; Descent 1m 837 bra divemode_option2 ; Descent 1m
904 movf char_I_O2_ratio,W ; Add O2... 906 movf char_I_O2_ratio,W ; Add O2...
905 addwf char_I_He_ratio,W ; ...and He... 907 addwf char_I_He_ratio,W ; ...and He...
906 sublw .100 ; ...subtract both from 100 908 sublw .100 ; ...subtract both from 100
907 movwf char_I_N2_ratio ; -> N2! 909 movwf char_I_N2_ratio ; -> N2!
908 banksel common 910 banksel common
911 return
912
913 divemode_option_gaschange: ; Switch to the better gas
914 movff better_gas_number,menupos; 1-5
915 bsf divemode_gaschange ; Change the gas in the dive mode loop...
916 call menuview_toggle_reset ; Reset to zero (Zero=no menuview)
909 return 917 return
910 918
911 divemode_option0: ; Start/Setup Divemode menu 919 divemode_option0: ; Start/Setup Divemode menu
912 call TFT_clear_divemode_menu ; Clear menu area 920 call TFT_clear_divemode_menu ; Clear menu area
913 bcf menuview 921 bcf menuview