changeset 791:a652b0ff4dcf

NEW: CF74: Battery Timeout [min] - Battery symbol will blink if the OSTC was longer in active mode (since the last _full_ charge) then CF74
author heinrichsweikamp
date Thu, 28 Aug 2014 20:18:49 +0200
parents 53425d598585
children 19aec5caa759
files code_part1/OSTC_code_asm_part1/changelog.txt code_part1/OSTC_code_asm_part1/english_text.asm code_part1/OSTC_code_asm_part1/french_text.asm code_part1/OSTC_code_asm_part1/german_text.asm code_part1/OSTC_code_asm_part1/menu_custom.asm code_part1/OSTC_code_asm_part1/menu_reset.asm code_part1/OSTC_code_asm_part1/outputs.asm code_part1/OSTC_code_asm_part1/russian_text.asm code_part1/OSTC_code_asm_part1/spanish_text.asm
diffstat 9 files changed, 36 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/changelog.txt	Thu Aug 28 17:45:16 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/changelog.txt	Thu Aug 28 20:18:49 2014 +0200
@@ -2,7 +2,10 @@
 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: Store useage timer in logbook header (Byte 54, see documentation)
+NEW: CF74: Battery Timeout [min] - Battery symbol will blink if the OSTC was 
+     longer in active mode (since the last _full_ charge) then CF74.
+     Default=1800 (30hours)
 
 New in 2.93:
 BETA Version
--- a/code_part1/OSTC_code_asm_part1/english_text.asm	Thu Aug 28 17:45:16 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/english_text.asm	Thu Aug 28 20:18:49 2014 +0200
@@ -337,7 +337,7 @@
     TCODE    .40,   .35,     "S.StopStart [m]"           ;200 S.StopStart [m] (CF71: Safety Stop Start Depth [m])
     TCODE    .40,   .35,     "S.StopEnd   [m]"           ;201 S.StopEnd   [m] (CF72: Safety Stop End Depth [m])
     TCODE    .40,   .35,     "S.StopReset [m]"           ;202 S.StopReset [m] (CF73: Safety Stop Reset Depth [m])
-    TCODE    .40,   .35,     "unused         "           ;203 unused
+    TCODE    .40,   .35,     "Batt.Time [min]"           ;203 Batt. Time [min] (CF74: Battery time-out [min])
     TCODE    .40,   .35,     "unused         "           ;204 unused
     TCODE    .40,   .35,     "unused         "           ;205 unused
     TCODE    .40,   .35,     "unused         "           ;206 unused
--- a/code_part1/OSTC_code_asm_part1/french_text.asm	Thu Aug 28 17:45:16 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/french_text.asm	Thu Aug 28 20:18:49 2014 +0200
@@ -339,7 +339,7 @@
     TCODE    .40,   .35,     "Début P.Sécu[m]"  		 ;200 S.StopStart [m] (CF71: Safety Stop Start Depth [m])
     TCODE    .40,   .35,     "Fin P.Sécu  [m]"  		 ;201 S.StopEnd   [m] (CF72: Safety Stop End Depth [m])
     TCODE    .40,   .35,     "RaZ P.Sécu  [m]"  		 ;202 S.StopReset [m] (CF73: Safety Stop Reset Depth [m])
-    TCODE    .40,   .35,     "unused         "           ;203 unused
+    TCODE    .40,   .35,     "Batt.Time [min]"           ;203 Batt. Time [min] (CF74: Battery time-out [min])
     TCODE    .40,   .35,     "unused         "           ;204 unused
     TCODE    .40,   .35,     "unused         "           ;205 unused
     TCODE    .40,   .35,     "unused         "           ;206 unused
--- a/code_part1/OSTC_code_asm_part1/german_text.asm	Thu Aug 28 17:45:16 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/german_text.asm	Thu Aug 28 20:18:49 2014 +0200
@@ -338,7 +338,7 @@
     TCODE    .40,   .35,     "S.Stop Start[m]"           ;200 S.StopStart [m] (CF71: Safety Stop Start Depth [m])
     TCODE    .40,   .35,     "S.Stop Ende [m]"           ;201 S.StopEnd   [m] (CF72: Safety Stop End Depth [m])
     TCODE    .40,   .35,     "S.Stop Reset[m]"           ;202 S.StopReset [m] (CF73: Safety Stop Reset Depth [m])
-    TCODE    .40,   .35,     "unbenutzt      "           ;203 unused
+    TCODE    .40,   .35,     "Batt.Zeit [min]"           ;203 Batt. Time [min] (CF74: Battery time-out [min])
     TCODE    .40,   .35,     "unbenutzt      "           ;204 unused
     TCODE    .40,   .35,     "unbenutzt      "           ;205 unused
     TCODE    .40,   .35,     "unbenutzt      "           ;206 unused
--- a/code_part1/OSTC_code_asm_part1/menu_custom.asm	Thu Aug 28 17:45:16 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/menu_custom.asm	Thu Aug 28 20:18:49 2014 +0200
@@ -149,13 +149,13 @@
 	movwf	EEADRH					; bank 1
 	movlw	d'32'
 	subwf	customfunction_temp1,F
-	movlw	d'63'
+	movlw	d'31'
 	cpfsgt	customfunction_temp1
 	bra		getcustom15_3			; bank 1
 
 	movlw	d'2'
 	movwf	EEADRH					; bank 2
-	movlw	d'64'
+	movlw	d'32'
 	subwf	customfunction_temp1,F
 getcustom15_3:
 	movf	customfunction_temp1,W
--- a/code_part1/OSTC_code_asm_part1/menu_reset.asm	Thu Aug 28 17:45:16 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/menu_reset.asm	Thu Aug 28 20:18:49 2014 +0200
@@ -203,7 +203,7 @@
 	CF_DEFAULT    CF_DECI,      d'29',  d'25',  d'50'   ; CF72 Safety Stop End Depth [dm]
 	CF_DEFAULT    CF_DECI,      d'101', d'75',  d'201'  ; CF73 Safety Stop Reset Depth [dm]
 
-	CF_DEFAULT    CF_INT8,      d'0',   d'0',   d'0'    ; CF74 unused
+	CF_DEFAULT    CF_INT15,     d'1800',d'0',   d'3600' ; CF74 Battery Timeout [min]
 	CF_DEFAULT    CF_INT8,      d'0',   d'0',   d'0'    ; CF75 unused
 	CF_DEFAULT    CF_INT8,      d'0',   d'0',   d'0'    ; CF76 unused
 	CF_DEFAULT    CF_INT8,      d'0',   d'0',   d'0'    ; CF77 unused
--- a/code_part1/OSTC_code_asm_part1/outputs.asm	Thu Aug 28 17:45:16 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/outputs.asm	Thu Aug 28 20:18:49 2014 +0200
@@ -2232,9 +2232,32 @@
 	call	DISP_standard_color
 	return
 
+update_batt_voltage_clear:   ; Clear every two seconds if on_time_seconds:3 > CF74*60
+    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+0,sub_b+0
+    movff   xC+1,sub_b+1
+    GETCUSTOM15     d'74'
+    movff   lo,sub_a+0
+    movff   hi,sub_a+1
+    call    sub16       ;  sub_c = sub_a - sub_b
+    btfss   neg_flag
+    bra     update_batt_voltage0    ; Normal display
+    WIN_BOX_BLACK   .174, .194, .1, .34			;top, bottom, left, right
+    return
+
 update_batt_voltage:
 	ostc_debug	'f'
-
+    btfss   secs,0
+    bra     update_batt_voltage_clear   ; Clear every two seconds if on_time_seconds:3 > CF74*60
+
+update_batt_voltage0:
 	GETCUSTOM8	d'31'			; =1 if battery voltage should be visible
 	movwf	lo
 	movlw	d'1'
--- a/code_part1/OSTC_code_asm_part1/russian_text.asm	Thu Aug 28 17:45:16 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/russian_text.asm	Thu Aug 28 20:18:49 2014 +0200
@@ -340,7 +340,7 @@
     TCODE    .40,   .35,     "Îñò.Áåç. Íà÷[m]"           ;200 S.StopStart [m] (CF71: Safety Stop Start Depth [m])
     TCODE    .40,   .35,     "Îñò.Áåç. Êíö[m]"           ;201 S.StopEnd   [m] (CF72: Safety Stop End Depth [m])
     TCODE    .40,   .35,     "Îñò.Áåç. Ñáð[m]"           ;202 S.StopReset [m] (CF73: Safety Stop Reset Depth [m])
-    TCODE    .40,   .35,     "unused         "           ;203 unused
+    TCODE    .40,   .35,     "Batt.Time [min]"           ;203 Batt. Time [min] (CF74: Battery time-out [min])
     TCODE    .40,   .35,     "unused         "           ;204 unused
     TCODE    .40,   .35,     "unused         "           ;205 unused
     TCODE    .40,   .35,     "unused         "           ;206 unused
--- a/code_part1/OSTC_code_asm_part1/spanish_text.asm	Thu Aug 28 17:45:16 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/spanish_text.asm	Thu Aug 28 20:18:49 2014 +0200
@@ -336,7 +336,7 @@
     TCODE    .40,   .35,     "S.StopStart [m]"           ;200 S.StopStart [m] (CF71: Safety Stop Start Depth [m])
     TCODE    .40,   .35,     "S.StopEnd   [m]"           ;201 S.StopEnd   [m] (CF72: Safety Stop End Depth [m])
     TCODE    .40,   .35,     "S.StopReset [m]"           ;202 S.StopReset [m] (CF73: Safety Stop Reset Depth [m])
-    TCODE    .40,   .35,     "unused         "           ;203 unused
+    TCODE    .40,   .35,     "Batt.Time [min]"           ;203 Batt. Time [min] (CF74: Battery time-out [min])
     TCODE    .40,   .35,     "unused         "           ;204 unused
     TCODE    .40,   .35,     "unused         "           ;205 unused
     TCODE    .40,   .35,     "unused         "           ;206 unused