changeset 38:64976f1e0a1c

Show total divetime in apnea mode
author mh@mh-THINK.fritz.box
date Thu, 15 Aug 2013 13:30:05 +0200
parents 0e1723f2761e
children e4e91fe8b09d
files src/divemode.asm src/divemode.inc src/text_english.inc src/text_french.inc src/text_german.inc src/text_italian.inc src/tft_outputs.asm
diffstat 7 files changed, 41 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/divemode.asm	Thu Aug 15 12:39:05 2013 +0200
+++ b/src/divemode.asm	Thu Aug 15 13:30:05 2013 +0200
@@ -140,10 +140,6 @@
 ;--------------------------------------------------------------------------------------------------------
 
 
-
-
-
-
 divemode_apnoe_tasks:                       ; 1 sec. Apnoe tasks
 	call	TFT_display_apnoe_descent		; Show descent timer
 	call	TFT_max_pressure				; use normal max. depth
@@ -1086,7 +1082,8 @@
 	clrf	apnoe_surface_mins			
 	clrf	apnoe_surface_secs		
 	clrf	apnoe_mins
-	clrf	apnoe_secs
+    movlw   .2
+    movwf	apnoe_secs
 	clrf	divemins+0
 	clrf	divemins+1
     bcf     no_more_divesecs                ; =1: Do no longer show seconds in divemode
--- a/src/divemode.inc	Thu Aug 15 12:39:05 2013 +0200
+++ b/src/divemode.inc	Thu Aug 15 13:30:05 2013 +0200
@@ -37,6 +37,13 @@
 #DEFINE divetime_secs_row       depth_row+.12
 #DEFINE	divetime_apnoe_row		depth_row
 #DEFINE	divetime_apnoe_column	.103
+#DEFINE apnoe_total_divetime_row            divetime_apnoe_row+.50
+#DEFINE apnoe_total_divetime_column         divetime_apnoe_column
+#DEFINE apnoe_total_divetime_secs_row       apnoe_total_divetime_row+.12
+#DEFINE apnoe_total_divetime_secs_column    divetime_secs_column
+#DEFINE total_apnoe_text_column             .95
+#DEFINE total_apnoe_text_row                apnoe_total_divetime_row-.14
+
 
 #DEFINE divemode_mask_depth_row         .0
 #DEFINE divemode_mask_depth_column      .12
--- a/src/text_english.inc	Thu Aug 15 12:39:05 2013 +0200
+++ b/src/text_english.inc	Thu Aug 15 13:30:05 2013 +0200
@@ -198,7 +198,8 @@
     TCODE   tDiveTotalAvr,  "Total Avr"
     TCODE   tDiveStopwatch, "Stopwatch"
     TCODE   tDiveStopAvr,   "Stopped Avr"
-    TCODE   tApnoeMax,      "Last Descend"  ; Last decend
+    TCODE   tApnoeTotal,    "Total Divetime:"; Total Divetime
+    TCODE   tApnoeMax,      "Last Descend"  ; Last descend
     TCODE   tApnoeSurface,  "Surface Time"  ; Surface Time
     TCODE   tDiveDecoplan,  "Decoplan"      ; Decoplan
     TCODE   tDiveClock,     "Clock"         ; Clock
--- a/src/text_french.inc	Thu Aug 15 12:39:05 2013 +0200
+++ b/src/text_french.inc	Thu Aug 15 13:30:05 2013 +0200
@@ -198,18 +198,19 @@
     TCODE   tDiveTotalAvr,  "Prof. Moy."
     TCODE   tDiveStopwatch, "Chrono"
     TCODE   tDiveStopAvr,   "P.MoyChrono"
+    TCODE   tApnoeTotal,    "   Durée Total"; Total Divetime
     TCODE   tApnoeMax,      "Dern.plongée"  ; Last decend
-    TCODE   tApnoeSurface,  "Tps.Surface"  ; Surface Time
-    TCODE   tDiveDecoplan,  "Runtime"      ; Decoplan
+    TCODE   tApnoeSurface,  "Tps.Surface"   ; Surface Time
+    TCODE   tDiveDecoplan,  "Runtime"       ; Decoplan
     TCODE   tDiveClock,     "Heure"         ; Clock
     TCODE   tDiveEAD_END,   "PEA/END"       ; EAD/END
-    TCODE   tDiveTissues,   "Tissus"       ; Tissues
+    TCODE   tDiveTissues,   "Tissus"        ; Tissues
     TCODE   tEND,           "END:"          ; END:
     TCODE   tHe,            "He"            ; He
     TCODE   tN2,            "N2"            ; N2
     TCODE   tDiveBailout,   "Bailout"       ; Bailout
-    TCODE   tGFactors,      "Valeurs GF"     ; GF Values
-    TCODE   taGFactors,     "Valeurs aGF"    ; aGF Values
+    TCODE   tGFactors,      "Valeurs GF"    ; GF Values
+    TCODE   taGFactors,     "Valeurs aGF"   ; aGF Values
     TCODE   tGFInfo,        "GF Info"       ; GF Info
 
 ; Divemode menu
--- a/src/text_german.inc	Thu Aug 15 12:39:05 2013 +0200
+++ b/src/text_german.inc	Thu Aug 15 13:30:05 2013 +0200
@@ -198,6 +198,7 @@
     TCODE   tDiveTotalAvr,  "Durchschn.1"
     TCODE   tDiveStopwatch, "Stoppuhr"
     TCODE   tDiveStopAvr,   "Durchschn.2"
+    TCODE   tApnoeTotal,    "    Gesamtzeit"; Total Divetime
     TCODE   tApnoeMax,      "  Letzter TG"  ; Last decend
     TCODE   tApnoeSurface,  "Oberflächenzeit"  ; Surface Time
     TCODE   tDiveDecoplan,  "Dekoplan"      ; Decoplan
--- a/src/text_italian.inc	Thu Aug 15 12:39:05 2013 +0200
+++ b/src/text_italian.inc	Thu Aug 15 13:30:05 2013 +0200
@@ -198,6 +198,7 @@
     TCODE   tDiveTotalAvr,  "Media"
     TCODE   tDiveStopwatch, "Cronometro"
     TCODE   tDiveStopAvr,   "Media Interrotta"
+    TCODE   tApnoeTotal,    "Total Divetime:"   ; Total Divetime
     TCODE   tApnoeMax,      "Ultima Discesa"  ; Last decend
     TCODE   tApnoeSurface,  "Tempo Superficie"  ; Surface Time
     TCODE   tDiveDecoplan,  "Piano Deco"      ; Decoplan
--- a/src/tft_outputs.asm	Thu Aug 15 12:39:05 2013 +0200
+++ b/src/tft_outputs.asm	Thu Aug 15 13:30:05 2013 +0200
@@ -2396,7 +2396,6 @@
 	output_16_3                     ; displays only last three figures from a 16Bit value (0-999)
 	call	TFT_standard_color
 	STRCAT_PRINT ""                 ; Show minutes in large font
-
 	WIN_SMALL  divetime_secs_column, divetime_secs_row   		; left position for two sec figures
 	lfsr    FSR2,buffer
 	PUTC    ':'
@@ -2405,6 +2404,28 @@
 	output_99x
 	bcf     leftbind
 	STRCAT_PRINT ""                 ; Show seconds in small font
+
+
+    call    TFT_divemask_color
+    WIN_TINY    total_apnoe_text_column,total_apnoe_text_row
+    STRCPY_TEXT_PRINT   tApnoeTotal
+	call	TFT_standard_color
+	movff	divemins,lo
+    clrf    hi
+	WIN_MEDIUM	apnoe_total_divetime_column, apnoe_total_divetime_row
+	lfsr	FSR2,buffer
+	output_16_3                     ; displays only last three figures from a 16Bit value (0-999)
+	call	TFT_standard_color
+	STRCAT_PRINT ""                 ; Show minutes in large font
+	WIN_SMALL  apnoe_total_divetime_secs_column, apnoe_total_divetime_secs_row   		; left position for two sec figures
+	lfsr    FSR2,buffer
+	PUTC    ':'
+	bsf		leftbind
+	movff	divesecs,lo
+	output_99x
+	bcf     leftbind
+	STRCAT_PRINT ""                 ; Show seconds in small font
+
 	return
 	
 ;=============================================================================