diff src/start.asm @ 235:23311219dacc

under construction: new hardware_flag to configure different hardware versions
author heinrichsweikamp
date Wed, 25 Feb 2015 16:49:59 +0100
parents 5a4801918be9
children e2ea74646127
line wrap: on
line diff
--- a/src/start.asm	Wed Feb 25 13:57:30 2015 +0100
+++ b/src/start.asm	Wed Feb 25 16:49:59 2015 +0100
@@ -139,7 +139,7 @@
     goto	use_old_batteries				; No, load last stored battery values
 
     call    lt2942_get_status               ; Check for gauge IC
-    btfsc   cr_hardware                     ; cR hardware?
+    btfsc   rechargeable                     ; cR hardware?
     goto	use_old_batteries				; Yes, load last stored battery values
 
     ; No, cR and we have a power-on reset
@@ -253,10 +253,11 @@
     clrf	flag8
     clrf    flag9
     clrf    flag10
-	bsf		tft_is_dimming	; TFT is dimming up (soon), ignore ambient sensor!
+    clrf    hardware_flag           ; hardware descriptor flag
+	bsf		tft_is_dimming          ; TFT is dimming up (soon), ignore ambient sensor!
 
     call    lt2942_get_status       ; Check for gauge IC
-    btfsc   cr_hardware             ; cR hardware?
+    btfsc   rechargeable             ; cR hardware?
     call    lt2942_init             ; Yes, init battery gauge IC
 
 	; Select high altitude (Fly) mode?
@@ -270,9 +271,9 @@
 	btfss	neg_flag				; Result negative (Ambient>880mbar)?
 	bsf		high_altitude_mode		; No, Set Flag!
 
-    btfss   cr_hardware
+    btfss   rechargeable
     bsf     TRISB,3
-    btfss   cr_hardware
+    btfss   rechargeable
     bsf     TRISG,0
 	call	ext_flash_disable_protection	; Disable write protection for external flash