changeset 757:39ff186b6f98

Dev Bugfix: ignore analog out of bounds limits for DiveO2 sensor: The DiveO2 sensor provides a status information which may be used to identify if the value is valid or not. The sensor does not provide a voltage => to have a value for the voltage the value of the ppo2 is taken (equals calibration coeff of 1). For the analog out of bounds detection this value is too high and the DiveO2 is marked as out of bounds. To avoid this problem DiveO2 sensors are now excluded from the analog out of bounds detection.
author Ideenmodellierer
date Tue, 07 Mar 2023 22:14:20 +0100
parents 6de83d8205a0
children b6d8a6fbf4fd
files Discovery/Src/tCCR.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Src/tCCR.c	Tue Mar 07 20:02:05 2023 +0100
+++ b/Discovery/Src/tCCR.c	Tue Mar 07 22:14:20 2023 +0100
@@ -181,7 +181,8 @@
         if(sensorActive[index])
         {
         	if(((stateUsed->lifeData.extIf_sensor_map[index] == SENSOR_DIGO2) && (((SSensorDataDiveO2*)(stateUsed->lifeData.extIf_sensor_data))->status & DVO2_FATAL_ERROR))
-        			|| ((stateUsed->lifeData.sensorVoltage_mV[index] < MIN_SENSOR_VOLTAGE_MV) ||	(stateUsed->lifeData.sensorVoltage_mV[index] > MAX_SENSOR_VOLTAGE_MV)))
+        			|| ((stateUsed->lifeData.extIf_sensor_map[index] != SENSOR_DIGO2)
+        					&& (((stateUsed->lifeData.sensorVoltage_mV[index] < MIN_SENSOR_VOLTAGE_MV) || (stateUsed->lifeData.sensorVoltage_mV[index] > MAX_SENSOR_VOLTAGE_MV)))))
 			{
 				sensorActive[index] = 0;
 				switch(index)