changeset 790:53425d598585

NEW: Store useage timer in logbook header (Byte 54)
author heinrichsweikamp
date Thu, 28 Aug 2014 17:45:16 +0200
parents 380a07e4fc15
children a652b0ff4dcf
files code_part1/OSTC_code_asm_part1/changelog.txt code_part1/OSTC_code_asm_part1/divemode.asm code_part1/OSTC_code_asm_part1/menu_battery.asm docu/ostc_interface_description.odt
diffstat 4 files changed, 38 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/changelog.txt	Thu Aug 28 16:34:55 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/changelog.txt	Thu Aug 28 17:45:16 2014 +0200
@@ -2,6 +2,7 @@
 BETA Version
 BUGFIX: False bailout flag in logbook
 NEW: On-Time counter for better battery information
+NEW: Store useage timer in logbook header (Byte 54)
 
 New in 2.93:
 BETA Version
--- a/code_part1/OSTC_code_asm_part1/divemode.asm	Thu Aug 28 16:34:55 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/divemode.asm	Thu Aug 28 17:45:16 2014 +0200
@@ -1608,8 +1608,17 @@
 	movff   gaslist_active,WREG             ; "Gas active" flag register
 	call	write_external_eeprom			; write WREG into external memory
 
-	clrf	WREG
-	call	write_external_eeprom			; Spare1
+    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   LOW     .3600
+    movwf   xB+0
+    movlw   HIGH    .3600
+    movwf   xB+1
+    call    div32x16  ; xC:4 / xB:2 = xC+3:xC+2 with xC+1:xC+0 as remainder
+    movf    xC+0,W
+	call	write_external_eeprom			; Full hours of on-time since last full charge
 
 	movlw	0xFB						; Header stop
 	call	write_external_eeprom
--- 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:
Binary file docu/ostc_interface_description.odt has changed