diff src/menu_tree.asm @ 477:44b8a826b314

NEW: Show battery type in surface mode next to battery voltage
author heinrichsweikamp
date Mon, 16 Jan 2017 11:59:55 +0100
parents 2880aa1264f5
children ad8acade5567
line wrap: on
line diff
--- a/src/menu_tree.asm	Mon Jan 16 11:05:02 2017 +0100
+++ b/src/menu_tree.asm	Mon Jan 16 11:59:55 2017 +0100
@@ -746,9 +746,8 @@
 	clrf	EEADRH
 	read_int_eeprom 0x0F	    ; =0:1.5V, =1:3,6V Saft, =2:LiIon 3,7V/0.8Ah, =3:LiIon 3,7V/3.1Ah, =4: LiIon 3,7V/2.3Ah
 	incfsz	EEDATA,F	    ; Was 0xFF?
-	bra	use_old_prior_209_2 ; Yes
-	return
-use_old_prior_209_2:
+	return			    ; No, done.
+
 	call    lt2942_get_status       ; Check for gauge IC
 	movlw   .3			; Assume a 18650
 	btfss   battery_gauge_available ; cR/2 hardware?
@@ -776,16 +775,16 @@
 	movff	EEDATA,battery_type; =0:1.5V, =1:3,6V Saft, =2:LiIon 3,7V/0.8Ah, =3:LiIon 3,7V/3.1Ah, =4: LiIon 3,7V/2.3Ah
 
 	rcall	setup_new_saft	    ; Any other value
-	incf	EEDATA,F
+	incf	EEDATA,F	    ; 1 ... 5
 	dcfsnz	EEDATA,F
 	rcall	setup_new_15v	    ;=0
 	dcfsnz	EEDATA,F
 	rcall	setup_new_saft	    ;=1
 	dcfsnz	EEDATA,F
 	rcall	setup_new_panasonic ;=2
-	dcfsnz	EEDATA,W		   
+	dcfsnz	EEDATA,F		   
 	rcall	setup_new_18650	    ;=3
-	dcfsnz	EEDATA,W		   
+	dcfsnz	EEDATA,F		   
 	rcall	setup_new_16650	    ;=4
 	
 	bcf	use_old_batt_flag		; clear flag