Mercurial > public > hwos_code
comparison src/customview.asm @ 137:28b057aa9f75
Simplify gas change
author | heinrichsweikamp |
---|---|
date | Thu, 17 Jul 2014 14:24:51 +0200 |
parents | 9a637c9bb19a |
children | 2852b0bd6391 |
comparison
equal
deleted
inserted
replaced
136:9a637c9bb19a | 137:28b057aa9f75 |
---|---|
242 movlw color_yellow | 242 movlw color_yellow |
243 call TFT_set_color | 243 call TFT_set_color |
244 WIN_SMALL_INVERT divemode_simtext_column,divemode_simtext_row | 244 WIN_SMALL_INVERT divemode_simtext_column,divemode_simtext_row |
245 movff menupos2,WREG ; Menupos2 holds number of menu option to show | 245 movff menupos2,WREG ; Menupos2 holds number of menu option to show |
246 dcfsnz WREG,F | 246 dcfsnz WREG,F |
247 bra menuview_view_gaschange ; If a better gas is indicated | |
248 dcfsnz WREG,F | |
247 bra menuview_view1 | 249 bra menuview_view1 |
248 dcfsnz WREG,F | 250 dcfsnz WREG,F |
249 bra menuview_view2 | 251 bra menuview_view2 |
250 dcfsnz WREG,F | 252 dcfsnz WREG,F |
251 bra menuview_view3 | 253 bra menuview_view3 |
257 bra menuview_view6 | 259 bra menuview_view6 |
258 menuview_exit: | 260 menuview_exit: |
259 call TFT_standard_color | 261 call TFT_standard_color |
260 WIN_INVERT .0 | 262 WIN_INVERT .0 |
261 return ; Menupos2 = 0, Show nothing | 263 return ; Menupos2 = 0, Show nothing |
264 | |
265 | |
266 menuview_view_gaschange: | |
267 extern gaslist_strcat_gas_mod | |
268 | |
269 btfss better_gas_available ; =1: A better gas is available | |
270 bra menuview_toggle ; No, call next option | |
271 bsf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint | |
272 movff better_gas_number,PRODL ; number (1-5) of the "better gas" in divemode, =0: no better gas available | |
273 decf PRODL,F | |
274 call gaslist_strcat_gas_mod ; Append gas description of gas #PRODL (0-4) to current string | |
275 movlw .5 | |
276 movwf FSR2L ; Point to char 6 (5 chars gas description only) | |
277 STRCAT_PRINT "?" | |
278 bra menuview_exit ; Done. | |
262 menuview_view1: | 279 menuview_view1: |
263 btfsc FLAG_apnoe_mode ; In Apnoe mode? | 280 btfsc FLAG_apnoe_mode ; In Apnoe mode? |
264 bra menuview_toggle ; Call next option | 281 bra menuview_toggle ; Call next option |
265 btfsc FLAG_gauge_mode ; In Gauge mode? | 282 btfsc FLAG_gauge_mode ; In Gauge mode? |
266 bra menuview_toggle ; Call next option | 283 bra menuview_toggle ; Call next option |