diff Discovery/Src/simulation.c @ 748:be25ab2d902c

Added display of co2 ppm values: Updated output functions for CO2 visualization and added the CO2 measurement to the lower left corner selection field. The sensor provides the value as factor 10 of ppm that's why the data type had to be changed to 32bit if ppm should be available without scaling every time. Cleanup sensor dialog: The HUD battery was displayed by default and some sensor combinations were not displayed correctly. The refresh function was updated to fix these issues.
author Ideenmodellierer
date Sun, 05 Mar 2023 22:14:53 +0100
parents 01f40cb1057e
children 21949c88da90
line wrap: on
line diff
--- a/Discovery/Src/simulation.c	Sun Mar 05 22:06:47 2023 +0100
+++ b/Discovery/Src/simulation.c	Sun Mar 05 22:14:53 2023 +0100
@@ -203,6 +203,7 @@
     pDiveState->lifeData.ppO2Sensor_bar[1]  = pDiveState->lifeData.sensorVoltage_mV[1] * localCalibCoeff[1] * pDiveState->lifeData.pressure_ambient_bar;
     pDiveState->lifeData.ppO2Sensor_bar[2]  = pDiveState->lifeData.sensorVoltage_mV[2] * localCalibCoeff[2] * pDiveState->lifeData.pressure_ambient_bar;
 
+    pDiveState->lifeData.CO2_data.CO2_ppm  = stateRealGetPointer()->lifeData.CO2_data.CO2_ppm;
 
     if(is_ambient_pressure_close_to_surface(&pDiveState->lifeData)) // new hw 170214
     {