diff Discovery/Src/simulation.c @ 1070:4499227a2db8 Icon_Integration

Added compile option for o2/diluent pressure display: Some external devices (like the RedBare rebreather) provide pressure sensor information o2 and diluent bottles. A data channel from RTE to main CPU has been defined and a visualization has been added to the lower left corner (llc). Pressure will be displayed in the gas list as well => for o2 display the definition of a 100% o2 gas is needed. Diluent will be assigned to the first gas. The ADVANCED_GAS compile switch needs to be activated for this feature
author Ideenmodellierer
date Thu, 19 Feb 2026 13:17:25 +0100
parents 3c73180fde1d
children
line wrap: on
line diff
--- a/Discovery/Src/simulation.c	Tue Feb 17 20:46:45 2026 +0100
+++ b/Discovery/Src/simulation.c	Thu Feb 19 13:17:25 2026 +0100
@@ -225,6 +225,12 @@
         pDiveState->lifeData.bottle_bar[pDiveState->lifeData.actualGas.GasIdInSettings] = pRealState->lifeData.bottle_bar[pRealState->lifeData.actualGas.GasIdInSettings];
         pDiveState->lifeData.bottle_bar_age_MilliSeconds[pDiveState->lifeData.actualGas.GasIdInSettings] = pRealState->lifeData.bottle_bar_age_MilliSeconds[pRealState->lifeData.actualGas.GasIdInSettings];
 #endif
+#ifdef ENABLE_ADVANCED_GAS
+       for(index = 0; index < NUM_GASES * 2; index++)
+       {
+           pDiveState->lifeData.bottle_bar[index] = pRealState->lifeData.bottle_bar[index];
+       }
+#endif
     }
     else if(pDiveState->lifeData.depth_meter <= (float)(decom_get_actual_deco_stop(pDiveState) + 0.001))
     {