changeset 831:0cf00ecf3532

CHANGE: Color-code battery % display in surface mode (Charge, Full, Normal)
author heinrichsweikamp
date Tue, 08 Dec 2015 13:44:39 +0100
parents e8f5eed0eccf
children 63cce2e2ae20
files code_part1/OSTC_code_asm_part1/changelog.txt code_part1/OSTC_code_asm_part1/outputs.asm
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/changelog.txt	Mon Nov 09 14:04:17 2015 +0100
+++ b/code_part1/OSTC_code_asm_part1/changelog.txt	Tue Dec 08 13:44:39 2015 +0100
@@ -1,6 +1,6 @@
 New in 3.12:
 BUGFIX: Minor layout fix (Battery warning in divemode)
-
+CHANGE: Color-code battery % display in surface mode (Charge, Full, Normal)
 
 New in 3.11:
 BUGFIX: "First Diluent" and "SP Mode" used same EEPROM location
--- a/code_part1/OSTC_code_asm_part1/outputs.asm	Mon Nov 09 14:04:17 2015 +0100
+++ b/code_part1/OSTC_code_asm_part1/outputs.asm	Tue Dec 08 13:44:39 2015 +0100
@@ -2308,7 +2308,14 @@
 	WIN_LEFT	.1
 	WIN_FONT 	FT_SMALL
 	WIN_INVERT	.0					; Init new Wordprocessor
-	call	DISP_standard_color
+
+	GETCUSTOM8	d'35'			; Standard output color
+	btfsc	cc_active
+    movlw   color_orange        ; CC active
+	btfsc	charge_done
+	movlw	color_green			; Charge done.
+    call	DISP_set_color
+
     call    update_batt_get_percent_in_lo   ; 100 - 0
 	lfsr	FSR2,letter
     STRCPY  TXT_BATT            ; Batt:
@@ -2316,6 +2323,7 @@
 	output_8
 	bcf		leftbind
 	STRCAT_PRINT  "%"
+	call	DISP_standard_color
 	return
 
 update_batt_voltage2: