# HG changeset patch
# User heinrichsweikamp
# Date 1578494115 -3600
# Node ID 6f30f2011667471be0f55f625043bd359e682107
# Parent  44cb4e85864334aaadc6d45b8e98ba1cbb5cae2b
We got one report of false/freezd depth reading when jumping into 2m depth
instantaneously. The "PRESSURE_JUMP_VALID_MBAR" threshold was removed, the new
behaviour was tested in the pressure tank intensively and it's simply
better/more reliable without this threshold.

diff -r 44cb4e858643 -r 6f30f2011667 Small_CPU/Src/pressure.c
--- a/Small_CPU/Src/pressure.c	Sun Jan 05 14:57:50 2020 +0000
+++ b/Small_CPU/Src/pressure.c	Wed Jan 08 15:35:15 2020 +0100
@@ -51,7 +51,6 @@
 
 #define PRESSURE_SURFACE_MAX_MBAR			(1030.0f)		/* It is unlikely that pressure at surface is greater than this value => clip to it */
 #define PRESSURE_HISTORY_SIZE				(8u)
-#define PRESSURE_JUMP_VALID_MBAR	    	(500.0f)		/* values are measure several times a second => jumps > 5m very unlikely */
 
 #define PRESSURE_SURFACE_QUE					(30u)			/* history buffer [minutes] for past pressure measurements */
 #define PRESSURE_SURFACE_EVA_WINDOW				(15u)			/* Number of entries evaluated during instability test. Used to avoid detection while dive enters water */
@@ -632,12 +631,9 @@
 	}
 	else
 	{
-		if(fabs(pressurevalue - pressure_average) < PRESSURE_JUMP_VALID_MBAR)
-		{
 			pressure_history_mbar[pressurewriteindex++] = pressurevalue;
 			pressurewriteindex &= 0x7;	/* wrap around if necessary */
 			retval = 1;
-		}
 	}
 
 	return retval;