changeset 839:ab68f28514e0

undo faulty 6 seconds velocity from rev. 834
author heinrichsweikamp
date Fri, 07 Jul 2023 16:29:17 +0200
parents 2750099bf5bb
children b29cf452f91d
files code_part1/OSTC_code_asm_part1/definitions.asm code_part1/OSTC_code_asm_part1/divemode.asm code_part1/OSTC_code_asm_part1/surfmode.asm
diffstat 3 files changed, 11 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/definitions.asm	Tue Jan 19 12:57:23 2021 +0100
+++ b/code_part1/OSTC_code_asm_part1/definitions.asm	Fri Jul 07 16:29:17 2023 +0200
@@ -22,9 +22,9 @@
 ; ToDo:
 
 #DEFINE	softwareversion_x		d'3'		; Software version  XX.YY
-#DEFINE	softwareversion_y		d'15'		; Software version  XX.YY
+#DEFINE	softwareversion_y		d'16'		; Software version  XX.YY
 
-#DEFINE softwareversion_beta 	0 			; (and 0 for release)
+#DEFINE softwareversion_beta 	1 			; (and 0 for release)
 
 #DEFINE	max_custom_number		d'73'		; Number of last used custom function
 
@@ -279,7 +279,7 @@
 max_pressure    res 2           ; Max. pressure for the dive [mbar]
 avr_rel_pressure res 2          ; Average rel. pressure (Average depth) for the dive [mbar], Resettable
 avr_rel_pressure_total res 2    ; Average rel. pressure (Average depth) for the dive [mbar], Non-Resettable
-last_pressure   res 6
+last_pressure   res 2
 temperature_avg res 2           ; Temperature summing buffer.
 temperature     res 2           ; Final temperature. SIGNED.
 last_temperature res 2          ; Last displayed temperature (used to detect changes).
--- a/code_part1/OSTC_code_asm_part1/divemode.asm	Tue Jan 19 12:57:23 2021 +0100
+++ b/code_part1/OSTC_code_asm_part1/divemode.asm	Fri Jul 07 16:29:17 2023 +0200
@@ -951,19 +951,11 @@
 	bra		do_not_display_velocity			; display velocity only in divemode
 
 calc_velocity2:
-	; Update ring buffer
-	movff	last_pressure+2,last_pressure+4
-	movff	last_pressure+3,last_pressure+5
-	movff	last_pressure+0,last_pressure+2
-	movff	last_pressure+1,last_pressure+3
-	SAFE_2BYTE_COPY amb_pressure, last_pressure
-
-
-	; use 6sec interval for velocity
-	movff	last_pressure+4,sub_b+0
-	movff	last_pressure+5,sub_b+1
-    	movff	last_pressure+0,sub_a+0
-	movff	last_pressure+1,sub_a+1
+    SAFE_2BYTE_COPY amb_pressure, sub_a
+	movff	last_pressure+0,sub_b+0
+	movff	last_pressure+1,sub_b+1
+	movff	sub_a+0,last_pressure+0	; store old value for velocity
+	movff	sub_a+1,last_pressure+1
 
 	call	sub16						; sub_c = amb_pressure - last_pressure
 
--- a/code_part1/OSTC_code_asm_part1/surfmode.asm	Tue Jan 19 12:57:23 2021 +0100
+++ b/code_part1/OSTC_code_asm_part1/surfmode.asm	Fri Jul 07 16:29:17 2023 +0200
@@ -72,16 +72,12 @@
 ; Startup tasks for all modes
 	clrf	timeout_counter2				
 	clrf 	timeout_counter3
-	bcf	premenu						; clear premenu flag
-	bcf	menubit						; clear menu flag
+	bcf		premenu						; clear premenu flag
+	bcf		menubit						; clear menu flag
 	clrf	timer1int_counter2			; reset state counter
-	bcf	pressure_refresh			; Start new sensor run
+	bcf		pressure_refresh			; Start new sensor run
 	clrf	last_pressure+0
 	clrf	last_pressure+1
-	clrf	last_pressure+2
-	clrf	last_pressure+3
-	clrf	last_pressure+4
-	clrf	last_pressure+5
 	clrf	last_temperature+0
 	clrf	last_temperature+1