Mercurial > public > hwos_code
comparison src/gaslist.asm @ 530:d36f9fca10ae
2.20beta release
BUGFIX: Minor dive mode layout fixes in CCR Mode
CHANGE: Minor German language fixes
NEW: Warning for Diluent beeing out of safe ppO2 range in CCR modes
NEW: New Customview 9 in OSTC cR or OSTC3 shows mV readings after Sensor calibration
author | heinrichsweikamp |
---|---|
date | Thu, 17 Aug 2017 13:20:03 +0200 |
parents | 06e9370c6d75 |
children | 72ae62440597 |
comparison
equal
deleted
inserted
replaced
529:08d7eb26665c | 530:d36f9fca10ae |
---|---|
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_4 ; NEW ; No MOD-check and red color for disabled gases | 214 ;bra gaslist_strcat_3 ; 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 " " | |
234 | 229 |
235 ; Dummy code, needs some cleanup somedays... | 230 movf gaslist_gas,W ; load gas index |
236 ; Read switch depth | 231 lfsr FSR1,opt_gas_type ; set-up index read from gas table |
237 lfsr FSR1,char_I_dil_change-.5 ; Setup Diluents-5 | 232 movff PLUSW1,gaslist_Type ; get current gas type into lo |
238 movlw .4 | 233 movlw .3 ; compare current gas type with 3 = deco |
239 cpfsgt gaslist_gas ; >4? (-> Diluents) | 234 cpfseq gaslist_Type ; skip next line if gas is of type deco |
240 lfsr FSR1,opt_OC_bail_gas_change ; Setup OC Gases | 235 bra gaslist_strcat_5 ; gas is not deco gas |
241 | 236 |
242 movf gaslist_gas,W ; (0-4 for OC/Bailout, 5-9 for Diluents) | 237 call TFT_warnings_color ; Turn red if bigger and gas is a deco gas |
243 movff PLUSW1,lo | 238 ;bra gaslist_strcat_5 ; skip gaslist_strcat_gas_0 here |
244 ;rcall gaslist_calc_mod ; Compute MOD into WREG | |
245 | 239 |
246 gaslist_strcat_5: | 240 gaslist_strcat_5: |
247 TSTOSS opt_units ; 0=Meters, 1=Feets | 241 TSTOSS opt_units ; 0=Meters, 1=Feets |
248 bra gaslist_strcat_3_metric | 242 bra gaslist_strcat_3_metric |
249 ;gaslist_strcat_3_imperial: | 243 ;gaslist_strcat_3_imperial: |
250 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") | 244 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") |
251 bra gaslist_imperial_non_travel | 245 bra gaslist_imperial_decogas |
252 movf gaslist_gas,W | 246 movf gaslist_gas,W |
253 lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] | 247 lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] |
254 movff PLUSW1,gaslist_Type | 248 movff PLUSW1,gaslist_Type |
255 movlw .2 ; 2=Travel | 249 movlw .3 ; 0= Diabled, 1 = First, 2=Travel/Normal, 3 = Deco |
256 cpfseq gaslist_Type | 250 cpfslt gaslist_Type ; skip next line for disabled, first and travel gases |
257 bra gaslist_imperial_non_travel ; Non-Travel Gas | 251 bra gaslist_imperial_decogas ; Deco gas ? show meters |
258 bra gaslist_strcat_depth_travel ; Show "---" instead of "0m"... | 252 bra gaslist_strcat_depth_nondeco ; Show "---" instead of "0m"... |
259 | 253 |
260 gaslist_imperial_non_travel: | 254 gaslist_imperial_decogas: |
261 movf lo,W | 255 movf lo,W |
262 mullw .100 ; convert meters to mbar | 256 mullw .100 ; convert meters to mbar |
263 movff PRODL,lo | 257 movff PRODL,lo |
264 movff PRODH,hi | 258 movff PRODH,hi |
265 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet | 259 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet |
268 STRCAT_TEXT tFeets ; "ft" | 262 STRCAT_TEXT tFeets ; "ft" |
269 return | 263 return |
270 | 264 |
271 gaslist_strcat_3_metric: | 265 gaslist_strcat_3_metric: |
272 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") | 266 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") |
273 bra gaslist_metric_non_travel | 267 bra gaslist_metric_decogas |
274 movf gaslist_gas,W | 268 movf gaslist_gas,W |
275 lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] | 269 lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] |
276 movff PLUSW1,gaslist_Type | 270 movff PLUSW1,gaslist_Type |
277 movlw .2 ; 2=Travel | 271 movlw .3 ; 0= Diabled, 1 = First, 2=Travel/Normal, 3 = Deco |
278 cpfseq gaslist_Type | 272 cpfslt gaslist_Type ; skip next line for disabled, first and travel gases |
279 bra gaslist_metric_non_travel ; Non-Travel Gas | 273 bra gaslist_metric_decogas ; Deco gas ? show meters |
280 gaslist_strcat_depth_travel: ; Show "---" instead of "0m"... | 274 gaslist_strcat_depth_nondeco: ; Show "---" instead of "0m"... |
281 STRCAT "---" | 275 STRCAT "---" |
282 return | 276 return |
283 gaslist_metric_non_travel: | 277 gaslist_metric_decogas: |
284 output_99 | 278 output_99 |
285 STRCAT_TEXT tMeters ; "m" | 279 STRCAT_TEXT tMeters ; "m" |
286 return | 280 return |
287 | 281 |
288 ;---------------------------------------------------------------------------- | 282 ;---------------------------------------------------------------------------- |