diff Discovery/Src/check_warning.c @ 634:7c73f066cd16

Enable sensor check for Analog PPO2 mode: Checks which may trigger a fallback warning were not activated in previous versions. Beside enabling the checks the test logic has been changed. Before the change an avarage was build automatically using the remaining both sensors if one sensor failed. The scenario that also one of the remaining sensors may be out of bounds was not covered. The new implementation allows an out of bounds detection for all sensors in parallel. In that special case the last valid value will be used until the diver takes action (Fallback warning)
author Ideenmodellierer
date Wed, 24 Feb 2021 19:18:26 +0100
parents 64bf41faab83
children c47766ec3f96
line wrap: on
line diff
--- a/Discovery/Src/check_warning.c	Tue Feb 23 21:58:18 2021 +0100
+++ b/Discovery/Src/check_warning.c	Wed Feb 24 19:18:26 2021 +0100
@@ -184,8 +184,8 @@
 				if(!get_HUD_battery_voltage_V())
 					pDiveState->warnings.sensorLinkLost = 1;
 			}
-			test_O2_sensor_values_outOfBounds(&pDiveState->warnings.sensorOutOfBounds[0], &pDiveState->warnings.sensorOutOfBounds[1], &pDiveState->warnings.sensorOutOfBounds[2]);
 		}
+	test_O2_sensor_values_outOfBounds(&pDiveState->warnings.sensorOutOfBounds[0], &pDiveState->warnings.sensorOutOfBounds[1], &pDiveState->warnings.sensorOutOfBounds[2]);
 	return 		pDiveState->warnings.sensorLinkLost
 					+ pDiveState->warnings.sensorOutOfBounds[0]
 					+ pDiveState->warnings.sensorOutOfBounds[1]