Mercurial > public > hwos_code
comparison src/gaslist.asm @ 521:06e9370c6d75
CHANGE: Apply safety margin parameters to both models (GF and non-GF)
Put B?hlmann constants in code for readability
Fix unused gas warning (Do not warn)
author | heinrichsweikamp |
---|---|
date | Fri, 04 Aug 2017 16:01:28 +0200 |
parents | 72f6cb65ca4a |
children | d36f9fca10ae |
comparison
equal
deleted
inserted
replaced
520:1d74d6221084 | 521:06e9370c6d75 |
---|---|
151 PUTC " " | 151 PUTC " " |
152 ; Read switch depth | 152 ; Read switch depth |
153 movf gaslist_gas,W | 153 movf gaslist_gas,W |
154 lfsr FSR1,char_I_setpoint_change | 154 lfsr FSR1,char_I_setpoint_change |
155 movff PLUSW1,lo | 155 movff PLUSW1,lo |
156 bra gaslist_strcat_4 ; And return... | 156 bra gaslist_strcat_5 ; And return... |
157 | 157 |
158 ;---------------------------------------------------------------------------- | 158 ;---------------------------------------------------------------------------- |
159 ; Append gas description to current string. | 159 ; Append gas description to current string. |
160 ; Input: PRODL : gas number (0..4) | 160 ; Input: PRODL : gas number (0..4) |
161 ; FSR2 : Current string position. | 161 ; FSR2 : Current string position. |
211 movf PLUSW1,W | 211 movf PLUSW1,W |
212 bnz gaslist_strcat_3 | 212 bnz gaslist_strcat_3 |
213 call TFT_disabled_color | 213 call TFT_disabled_color |
214 bra gaslist_strcat_4 ; NEW ; No MOD-check and red color for disabled gases | 214 bra gaslist_strcat_4 ; NEW ; No MOD-check and red color for disabled gases |
215 gaslist_strcat_3: | 215 gaslist_strcat_3: |
216 rcall gaslist_strcat_gas_0 | |
217 PUTC " " | |
216 ; Read switch depth | 218 ; Read switch depth |
217 lfsr FSR1,char_I_dil_change-.5 ; Setup Diluents-5 | 219 lfsr FSR1,char_I_dil_change-.5 ; Setup Diluents-5 |
218 movlw .4 | 220 movlw .4 |
219 cpfsgt gaslist_gas ; >4? (-> Diluents) | 221 cpfsgt gaslist_gas ; >4? (-> Diluents) |
220 lfsr FSR1,opt_OC_bail_gas_change ; Setup OC Gases | 222 lfsr FSR1,opt_OC_bail_gas_change ; Setup OC Gases |
221 | 223 |
222 movf gaslist_gas,W ; (0-4 for OC/Bailout, 5-9 for Diluents) | 224 movf gaslist_gas,W ; (0-4 for OC/Bailout, 5-9 for Diluents) |
223 movff PLUSW1,lo | 225 movff PLUSW1,lo |
224 rcall gaslist_calc_mod ; Compute MOD into WREG | 226 rcall gaslist_calc_mod ; Compute MOD into WREG |
225 cpfsgt lo | 227 cpfsgt lo |
226 bra gaslist_strcat_4 | 228 bra gaslist_strcat_5 |
227 call TFT_warnings_color ; Turn red if bigger | 229 call TFT_warnings_color ; Turn red if bigger |
230 bra gaslist_strcat_5 ; skip gaslist_strcat_gas_0 here | |
228 gaslist_strcat_4: | 231 gaslist_strcat_4: |
229 rcall gaslist_strcat_gas_0 | 232 rcall gaslist_strcat_gas_0 |
230 PUTC " " | 233 PUTC " " |
231 | 234 |
235 ; Dummy code, needs some cleanup somedays... | |
236 ; Read switch depth | |
237 lfsr FSR1,char_I_dil_change-.5 ; Setup Diluents-5 | |
238 movlw .4 | |
239 cpfsgt gaslist_gas ; >4? (-> Diluents) | |
240 lfsr FSR1,opt_OC_bail_gas_change ; Setup OC Gases | |
241 | |
242 movf gaslist_gas,W ; (0-4 for OC/Bailout, 5-9 for Diluents) | |
243 movff PLUSW1,lo | |
244 ;rcall gaslist_calc_mod ; Compute MOD into WREG | |
245 | |
246 gaslist_strcat_5: | |
232 TSTOSS opt_units ; 0=Meters, 1=Feets | 247 TSTOSS opt_units ; 0=Meters, 1=Feets |
233 bra gaslist_strcat_3_metric | 248 bra gaslist_strcat_3_metric |
234 ;gaslist_strcat_3_imperial: | 249 ;gaslist_strcat_3_imperial: |
235 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") | 250 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") |
236 bra gaslist_imperial_non_travel | 251 bra gaslist_imperial_non_travel |
704 lfsr FSR1,char_I_dil_change-.5 ; Setup Diluents | 719 lfsr FSR1,char_I_dil_change-.5 ; Setup Diluents |
705 btfss ccr_diluent_setup ; In CCR-Menu? | 720 btfss ccr_diluent_setup ; In CCR-Menu? |
706 lfsr FSR1,opt_OC_bail_gas_change ; No, setup OC Gases | 721 lfsr FSR1,opt_OC_bail_gas_change ; No, setup OC Gases |
707 movf PLUSW1,W | 722 movf PLUSW1,W |
708 cpfslt lo | 723 cpfslt lo |
709 bra gaslist_strcat_4 ; And return... | 724 bra gaslist_strcat_5 ; And return... |
710 call TFT_warnings_color ; Turn red if bigger ! | 725 call TFT_warnings_color ; Turn red if bigger ! |
711 bra gaslist_strcat_4 ; And return... | 726 bra gaslist_strcat_5 ; And return... |
712 | 727 |
713 ;---------------------------------------------------------------------------- | 728 ;---------------------------------------------------------------------------- |
714 global gaslist_reset_mod | 729 global gaslist_reset_mod |
715 gaslist_reset_mod: | 730 gaslist_reset_mod: |
716 rcall gaslist_calc_mod ; Compute MOD | 731 rcall gaslist_calc_mod ; Compute MOD |