Mercurial > public > hwos_code
comparison src/gaslist.asm @ 174:932e91074bdb
CHANGE: Clarify Travel Gases with "---" as change depth
CHANGE: Enable "Change Depth" Menu only for deco gases
author | heinrichsweikamp |
---|---|
date | Sun, 05 Oct 2014 15:36:17 +0200 |
parents | 99ac325586ce |
children | e79bc535ef9e |
comparison
equal
deleted
inserted
replaced
173:3de05d9b7716 | 174:932e91074bdb |
---|---|
17 #include "tft_outputs.inc" | 17 #include "tft_outputs.inc" |
18 | 18 |
19 #include "shared_definitions.h" | 19 #include "shared_definitions.h" |
20 | 20 |
21 CBLOCK tmp+0x40 ; Keep space for menu processor | 21 CBLOCK tmp+0x40 ; Keep space for menu processor |
22 gaslist_gas | 22 gaslist_gas ; Check ram position in menu_tree.asm, too! |
23 gaslist_O2 | 23 gaslist_O2 |
24 gaslist_He | 24 gaslist_He |
25 gaslist_depth | 25 gaslist_depth |
26 gaslist_Type | 26 gaslist_Type |
27 ; Reserved to tmp+0x5F | 27 ; Reserved to tmp+0x5F |
230 call TFT_warnings_color ; Turn red if bigger | 230 call TFT_warnings_color ; Turn red if bigger |
231 gaslist_strcat_4: | 231 gaslist_strcat_4: |
232 TSTOSS opt_units ; 0=Meters, 1=Feets | 232 TSTOSS opt_units ; 0=Meters, 1=Feets |
233 bra gaslist_strcat_3_metric | 233 bra gaslist_strcat_3_metric |
234 ;gaslist_strcat_3_imperial: | 234 ;gaslist_strcat_3_imperial: |
235 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") | |
236 bra gaslist_imperial_non_travel | |
237 movf gaslist_gas,W | |
238 lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] | |
239 movff PLUSW1,gaslist_Type | |
240 movlw .2 ; 2=Travel | |
241 cpfseq gaslist_Type | |
242 bra gaslist_imperial_non_travel ; Non-Travel Gas | |
243 bra gaslist_strcat_depth_travel ; Show "---" instead of "0m"... | |
244 | |
245 gaslist_imperial_non_travel: | |
235 movf lo,W | 246 movf lo,W |
236 mullw .100 ; convert meters to mbar | 247 mullw .100 ; convert meters to mbar |
237 movff PRODL,lo | 248 movff PRODL,lo |
238 movff PRODH,hi | 249 movff PRODH,hi |
239 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet | 250 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet |
241 output_16_3 | 252 output_16_3 |
242 STRCAT_TEXT tFeets ; "ft" | 253 STRCAT_TEXT tFeets ; "ft" |
243 return | 254 return |
244 | 255 |
245 gaslist_strcat_3_metric: | 256 gaslist_strcat_3_metric: |
257 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") | |
258 bra gaslist_metric_non_travel | |
259 movf gaslist_gas,W | |
260 lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] | |
261 movff PLUSW1,gaslist_Type | |
262 movlw .2 ; 2=Travel | |
263 cpfseq gaslist_Type | |
264 bra gaslist_metric_non_travel ; Non-Travel Gas | |
265 gaslist_strcat_depth_travel: ; Show "---" instead of "0m"... | |
266 STRCAT "---" | |
267 return | |
268 gaslist_metric_non_travel: | |
246 output_99 | 269 output_99 |
247 STRCAT_TEXT tMeters ; "m" | 270 STRCAT_TEXT tMeters ; "m" |
248 return | 271 return |
249 | 272 |
250 ;---------------------------------------------------------------------------- | 273 ;---------------------------------------------------------------------------- |