Mercurial > public > ostc4
diff Discovery/Src/t7.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 | de56b8d75504 |
| children |
line wrap: on
line diff
--- a/Discovery/Src/t7.c Tue Feb 17 20:46:45 2026 +0100 +++ b/Discovery/Src/t7.c Thu Feb 19 13:17:25 2026 +0100 @@ -3255,7 +3255,10 @@ #ifdef ENABLE_BOTTLE_SENSOR uint16_t agedColor = 0; #endif - +#ifdef ENABLE_ADVANCED_GAS + static uint8_t gasIdO2 = 0; + static uint8_t gasIdDiluent = 0; +#endif SDivetime Stopwatch = {0,0,0,0}; float fAverageDepth, fAverageDepthAbsolute; const SDecoinfo * pDecoinfoStandard; @@ -3390,6 +3393,32 @@ snprintf(text,TEXTSIZE,"%d\016\016\017", stateUsed->lifeData.bottle_bar[stateUsed->lifeData.actualGas.GasIdInSettings]); break; #endif + +#ifdef ENABLE_ADVANCED_GAS + case LCC_BottleBar: + headerText[2] = TXT_AtemGasVorrat; + tinyHeaderFont = 1; + if(isLoopMode(stateUsed->diveSettings.diveMode)) + { + if((gasIdO2 == 0) && (gasIdDiluent == 0)) + { + DataEX_helper_Get_ID_Of_O2_Diluent(&gasIdO2, &gasIdDiluent); + } + if(gasIdO2 != 0) + { + textpointer = snprintf(text,TEXTSIZE,"\020\016\016%u",stateUsed->lifeData.bottle_bar[gasIdO2]); + } + if(gasIdDiluent != 0) + { + textpointer = snprintf(&text[textpointer],TEXTSIZE,"\n\r%u",stateUsed->lifeData.bottle_bar[gasIdDiluent]); + } + } + else + { + snprintf(text,TEXTSIZE,"%d\016\016\017", stateUsed->lifeData.bottle_bar[stateUsed->lifeData.actualGas.GasIdInSettings]); + } + break; +#endif #ifdef ENABLE_CO2_SUPPORT case LCC_CO2: headerText[2] = TXT_CO2Sensor;
