Mercurial > public > hwos_code
diff src/gaslist.asm @ 540:9a17b1db095b
Re-insert Rev. 530 changes into gaslist.asm
author | heinrichsweikamp |
---|---|
date | Mon, 28 Aug 2017 18:45:45 +0200 |
parents | a7ac5d3fd046 |
children | b7eb98dbd800 |
line wrap: on
line diff
--- a/src/gaslist.asm Mon Aug 28 17:51:14 2017 +0200 +++ b/src/gaslist.asm Mon Aug 28 18:45:45 2017 +0200 @@ -50,8 +50,8 @@ movff gaslist_O2,lo movff gaslist_He,hi - call customview_show_mix ; Put "Nxlo", "Txlo/hi", "Air" or "O2" into Postinc2 - return + goto customview_show_mix ; Put "Nxlo", "Txlo/hi", "Air" or "O2" into Postinc2, and RETURN + ;============================================================================= @@ -64,8 +64,7 @@ STRCAT ": " movff char_I_O2_ratio,lo movff char_I_He_ratio,hi - call customview_show_mix ; Put "Nxlo", "Txlo/hi", "Air" or "O2" into Postinc2 - return + goto customview_show_mix ; Put "Nxlo", "Txlo/hi", "Air" or "O2" into Postinc2, and RETURN global gaslist_show_type extern tGasDisabled @@ -215,7 +214,7 @@ movf PLUSW1,W bnz gaslist_strcat_3 call TFT_disabled_color - ;bra gaslist_strcat_3 ; NEW ; No MOD-check and red color for disabled gases + bra gaslist_strcat_4 ; NEW ; No MOD-check and red color for disabled gases gaslist_strcat_3: rcall gaslist_strcat_gas_0 PUTC " " @@ -230,37 +229,43 @@ rcall gaslist_calc_mod ; Compute MOD into WREG cpfsgt lo bra gaslist_strcat_5 + call TFT_warnings_color ; Turn red if bigger + bra gaslist_strcat_5 ; skip gaslist_strcat_gas_0 here +gaslist_strcat_4: + rcall gaslist_strcat_gas_0 + PUTC " " + + ; Dummy code, needs some cleanup somedays... + ; Read switch depth + lfsr FSR1,char_I_dil_change-.5 ; Setup Diluents-5 + movlw .4 + cpfsgt gaslist_gas ; >4? (-> Diluents) + lfsr FSR1,opt_OC_bail_gas_change ; Setup OC Gases + + movf gaslist_gas,W ; (0-4 for OC/Bailout, 5-9 for Diluents) + movff PLUSW1,lo + ;rcall gaslist_calc_mod ; Compute MOD into WREG - movf gaslist_gas,W ; load gas index - lfsr FSR1,opt_gas_type ; set-up index read from gas table - movff PLUSW1,gaslist_Type ; get current gas type into lo - movlw .3 ; compare current gas type with 3 = deco - cpfseq gaslist_Type ; skip next line if gas is of type deco - bra gaslist_strcat_5 ; gas is not deco gas - - call TFT_warnings_color ; Turn red if bigger and gas is a deco gas - ;bra gaslist_strcat_5 ; skip gaslist_strcat_gas_0 here - gaslist_strcat_5: TSTOSS opt_units ; 0=Meters, 1=Feets - bra gaslist_strcat_3_metric + bra gaslist_strcat_3_metric ;gaslist_strcat_3_imperial: btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") - bra gaslist_imperial_decogas + bra gaslist_imperial_non_travel movf gaslist_gas,W lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] movff PLUSW1,gaslist_Type - movlw .3 ; 0= Diabled, 1 = First, 2=Travel/Normal, 3 = Deco - cpfslt gaslist_Type ; skip next line for disabled, first and travel gases - bra gaslist_imperial_decogas ; Deco gas ? show meters - bra gaslist_strcat_depth_nondeco ; Show "---" instead of "0m"... + movlw .2 ; 2=Travel + cpfseq gaslist_Type + bra gaslist_imperial_non_travel ; Non-Travel Gas + bra gaslist_strcat_depth_travel ; Show "---" instead of "0m"... -gaslist_imperial_decogas: +gaslist_imperial_non_travel: movf lo,W mullw .100 ; convert meters to mbar movff PRODL,lo movff PRODH,hi - call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet + call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet bsf leftbind output_16_3 ; limit to 999 and display only (0-999) STRCAT_TEXT tFeets ; "ft" @@ -268,17 +273,17 @@ gaslist_strcat_3_metric: btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") - bra gaslist_metric_decogas + bra gaslist_metric_non_travel movf gaslist_gas,W lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] movff PLUSW1,gaslist_Type - movlw .3 ; 0= Diabled, 1 = First, 2=Travel/Normal, 3 = Deco - cpfslt gaslist_Type ; skip next line for disabled, first and travel gases - bra gaslist_metric_decogas ; Deco gas ? show meters -gaslist_strcat_depth_nondeco: ; Show "---" instead of "0m"... + movlw .2 ; 2=Travel + cpfseq gaslist_Type + bra gaslist_metric_non_travel ; Non-Travel Gas +gaslist_strcat_depth_travel: ; Show "---" instead of "0m"... STRCAT "---" return -gaslist_metric_decogas: +gaslist_metric_non_travel: output_99 STRCAT_TEXT tMeters ; "m" return