comparison src/start.asm @ 200:dcd513840c6c

cleanup
author heinrichsweikamp
date Wed, 12 Nov 2014 19:33:15 +0100
parents 669b5d00706d
children 93085f540746
comparison
equal deleted inserted replaced
199:800f09c9089c 200:dcd513840c6c
256 clrf flag9 256 clrf flag9
257 clrf flag10 257 clrf flag10
258 bsf tft_is_dimming ; TFT is dimming up (soon), ignore ambient sensor! 258 bsf tft_is_dimming ; TFT is dimming up (soon), ignore ambient sensor!
259 259
260 call lt2942_get_status ; Check for gauge IC 260 call lt2942_get_status ; Check for gauge IC
261 btfsc c3_hardware ; C3 hardware? 261 btfsc cr_hardware ; cR hardware?
262 call lt2942_init ; Yes, init battery gauge IC 262 call lt2942_init ; Yes, init battery gauge IC
263 263
264 ; Select high altitude (Fly) mode? 264 ; Select high altitude (Fly) mode?
265 movff last_surfpressure_30min+0,sub_b+0 265 movff last_surfpressure_30min+0,sub_b+0
266 movff last_surfpressure_30min+1,sub_b+1 266 movff last_surfpressure_30min+1,sub_b+1
270 movwf sub_a+0 270 movwf sub_a+0
271 call subU16 ; sub_c = sub_a - sub_b 271 call subU16 ; sub_c = sub_a - sub_b
272 btfss neg_flag ; Result negative (Ambient>880mbar)? 272 btfss neg_flag ; Result negative (Ambient>880mbar)?
273 bsf high_altitude_mode ; No, Set Flag! 273 bsf high_altitude_mode ; No, Set Flag!
274 274
275 btfss c3_hardware 275 btfss cr_hardware
276 bsf TRISB,3 276 bsf TRISB,3
277 btfss c3_hardware 277 btfss cr_hardware
278 bsf TRISG,0 278 bsf TRISG,0
279 call ext_flash_disable_protection ; Disable write protection for external flash 279 call ext_flash_disable_protection ; Disable write protection for external flash
280 280
281 bsf flip_screen ; Flip 180° 281 bsf flip_screen ; Flip 180°
282 TSTOSS opt_flip_screen ; =1: Flip the screen 282 TSTOSS opt_flip_screen ; =1: Flip the screen