Mercurial > public > hwos_code
comparison src/gaslist.asm @ 532:72ae62440597
Minor French text update, roll-back gaslist.asm changes
author | heinrichsweikamp |
---|---|
date | Mon, 21 Aug 2017 14:25:02 +0200 |
parents | d36f9fca10ae |
children | a7ac5d3fd046 |
comparison
equal
deleted
inserted
replaced
531:e6d730e771e6 | 532:72ae62440597 |
---|---|
209 | 209 |
210 movf gaslist_gas,W ; (0-4 for OC/Bailout, 5-9 for Diluents) | 210 movf gaslist_gas,W ; (0-4 for OC/Bailout, 5-9 for Diluents) |
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_3 ; 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 | 216 rcall gaslist_strcat_gas_0 |
217 PUTC " " | 217 PUTC " " |
218 ; Read switch depth | 218 ; Read switch depth |
219 lfsr FSR1,char_I_dil_change-.5 ; Setup Diluents-5 | 219 lfsr FSR1,char_I_dil_change-.5 ; Setup Diluents-5 |
224 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) |
225 movff PLUSW1,lo | 225 movff PLUSW1,lo |
226 rcall gaslist_calc_mod ; Compute MOD into WREG | 226 rcall gaslist_calc_mod ; Compute MOD into WREG |
227 cpfsgt lo | 227 cpfsgt lo |
228 bra gaslist_strcat_5 | 228 bra gaslist_strcat_5 |
229 call TFT_warnings_color ; Turn red if bigger | |
230 bra gaslist_strcat_5 ; skip gaslist_strcat_gas_0 here | |
231 gaslist_strcat_4: | |
232 rcall gaslist_strcat_gas_0 | |
233 PUTC " " | |
229 | 234 |
230 movf gaslist_gas,W ; load gas index | 235 ; Dummy code, needs some cleanup somedays... |
231 lfsr FSR1,opt_gas_type ; set-up index read from gas table | 236 ; Read switch depth |
232 movff PLUSW1,gaslist_Type ; get current gas type into lo | 237 lfsr FSR1,char_I_dil_change-.5 ; Setup Diluents-5 |
233 movlw .3 ; compare current gas type with 3 = deco | 238 movlw .4 |
234 cpfseq gaslist_Type ; skip next line if gas is of type deco | 239 cpfsgt gaslist_gas ; >4? (-> Diluents) |
235 bra gaslist_strcat_5 ; gas is not deco gas | 240 lfsr FSR1,opt_OC_bail_gas_change ; Setup OC Gases |
236 | 241 |
237 call TFT_warnings_color ; Turn red if bigger and gas is a deco gas | 242 movf gaslist_gas,W ; (0-4 for OC/Bailout, 5-9 for Diluents) |
238 ;bra gaslist_strcat_5 ; skip gaslist_strcat_gas_0 here | 243 movff PLUSW1,lo |
244 ;rcall gaslist_calc_mod ; Compute MOD into WREG | |
239 | 245 |
240 gaslist_strcat_5: | 246 gaslist_strcat_5: |
241 TSTOSS opt_units ; 0=Meters, 1=Feets | 247 TSTOSS opt_units ; 0=Meters, 1=Feets |
242 bra gaslist_strcat_3_metric | 248 bra gaslist_strcat_3_metric |
243 ;gaslist_strcat_3_imperial: | 249 ;gaslist_strcat_3_imperial: |
244 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") | 250 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") |
245 bra gaslist_imperial_decogas | 251 bra gaslist_imperial_non_travel |
246 movf gaslist_gas,W | 252 movf gaslist_gas,W |
247 lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] | 253 lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] |
248 movff PLUSW1,gaslist_Type | 254 movff PLUSW1,gaslist_Type |
249 movlw .3 ; 0= Diabled, 1 = First, 2=Travel/Normal, 3 = Deco | 255 movlw .2 ; 2=Travel |
250 cpfslt gaslist_Type ; skip next line for disabled, first and travel gases | 256 cpfseq gaslist_Type |
251 bra gaslist_imperial_decogas ; Deco gas ? show meters | 257 bra gaslist_imperial_non_travel ; Non-Travel Gas |
252 bra gaslist_strcat_depth_nondeco ; Show "---" instead of "0m"... | 258 bra gaslist_strcat_depth_travel ; Show "---" instead of "0m"... |
253 | 259 |
254 gaslist_imperial_decogas: | 260 gaslist_imperial_non_travel: |
255 movf lo,W | 261 movf lo,W |
256 mullw .100 ; convert meters to mbar | 262 mullw .100 ; convert meters to mbar |
257 movff PRODL,lo | 263 movff PRODL,lo |
258 movff PRODH,hi | 264 movff PRODH,hi |
259 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet | 265 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet |
262 STRCAT_TEXT tFeets ; "ft" | 268 STRCAT_TEXT tFeets ; "ft" |
263 return | 269 return |
264 | 270 |
265 gaslist_strcat_3_metric: | 271 gaslist_strcat_3_metric: |
266 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") | 272 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") |
267 bra gaslist_metric_decogas | 273 bra gaslist_metric_non_travel |
268 movf gaslist_gas,W | 274 movf gaslist_gas,W |
269 lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] | 275 lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] |
270 movff PLUSW1,gaslist_Type | 276 movff PLUSW1,gaslist_Type |
271 movlw .3 ; 0= Diabled, 1 = First, 2=Travel/Normal, 3 = Deco | 277 movlw .2 ; 2=Travel |
272 cpfslt gaslist_Type ; skip next line for disabled, first and travel gases | 278 cpfseq gaslist_Type |
273 bra gaslist_metric_decogas ; Deco gas ? show meters | 279 bra gaslist_metric_non_travel ; Non-Travel Gas |
274 gaslist_strcat_depth_nondeco: ; Show "---" instead of "0m"... | 280 gaslist_strcat_depth_travel: ; Show "---" instead of "0m"... |
275 STRCAT "---" | 281 STRCAT "---" |
276 return | 282 return |
277 gaslist_metric_decogas: | 283 gaslist_metric_non_travel: |
278 output_99 | 284 output_99 |
279 STRCAT_TEXT tMeters ; "m" | 285 STRCAT_TEXT tMeters ; "m" |
280 return | 286 return |
281 | 287 |
282 ;---------------------------------------------------------------------------- | 288 ;---------------------------------------------------------------------------- |