diff code_part1/OSTC_code_asm_part1/outputs.asm @ 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 2151c4135fad
children 23ed973d4fb9
line wrap: on
line diff
--- 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: