diff Discovery/Src/tMenuEditHardware.c @ 724:f285424f04d9

Development feature: external pressure sensor It now possible to use ADC channel 2 as channel for external pressure data. This function may be activated by compile switch only. It is usefull for sensor verification, e.g. by using a small pressure chamber.
author Ideenmodellierer
date Thu, 05 Jan 2023 18:30:06 +0100
parents b9f699d2e3d0
children 9c65d226f4f6
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditHardware.c	Thu Jan 05 18:27:04 2023 +0100
+++ b/Discovery/Src/tMenuEditHardware.c	Thu Jan 05 18:30:06 2023 +0100
@@ -568,6 +568,13 @@
 				{
 					if(pStateReal->lifeData.sensorVoltage_mV[loop] > 0.0001)		/* sensor connected ?*/
 					{
+#ifdef ENABLE_EXTERNAL_PRESSURE
+						if(loop == 2)
+						{
+							compensatedRef = pStateReal->lifeData.pressure_ambient_bar;
+						}
+#endif
+
 						pSettings->ppo2sensors_calibCoeff[loop] =  compensatedRef / pStateReal->lifeData.sensorVoltage_mV[loop];
 					}
 					else