diff code_part1/OSTC_code_asm_part1/menu_battery.asm @ 790:53425d598585

NEW: Store useage timer in logbook header (Byte 54)
author heinrichsweikamp
date Thu, 28 Aug 2014 17:45:16 +0200
parents 91ae251d379f
children c50296c3059e
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/menu_battery.asm	Thu Aug 28 16:34:55 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/menu_battery.asm	Thu Aug 28 17:45:16 2014 +0200
@@ -77,16 +77,34 @@
 
 	WIN_TOP		.119
 	lfsr	FSR2,letter
-	OUTPUTTEXT .119		; Lowest Battery at:
-	read_int_eeprom	d'42'	; Month
-	movff	EEDATA,convert_value_temp+0
-	read_int_eeprom	d'43'	; Day
-	movff	EEDATA,convert_value_temp+1
-	read_int_eeprom	d'44'	; Year
-	movff	EEDATA,convert_value_temp+2
-	call	DISP_convert_date		; coverts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2
+
+    STRCPY  "On-Time: "         ; On-Time in minutes:seconds
+    movff   on_time_seconds+0,xC+0
+    movff   on_time_seconds+1,xC+1
+    movff   on_time_seconds+2,xC+2
+    clrf    xC+4
+    movlw   .60
+    movwf   xB+0
+    clrf    xB+1
+    call    div32x16  ; xC:4 / xB:2 = xC+3:xC+2 with xC+1:xC+0 as remainder
+    movff   xC+1,hi
+    movff   xC+0,lo
+	bsf		leftbind
+	output_16                   ; full minutes
+    PUTC    " "
+    OUTPUTTEXT  .90             ; Minutes
 	call	word_processor
 
+;	OUTPUTTEXT .119		; Lowest Battery at:
+;	read_int_eeprom	d'42'	; Month
+;	movff	EEDATA,convert_value_temp+0
+;	read_int_eeprom	d'43'	; Day
+;	movff	EEDATA,convert_value_temp+1
+;	read_int_eeprom	d'44'	; Year
+;	movff	EEDATA,convert_value_temp+2
+;	call	DISP_convert_date		; coverts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2
+;	call	word_processor
+
 	WIN_TOP		.147
 	lfsr	FSR2,letter
 	OUTPUTTEXT .120		; Temp min: