diff Discovery/Src/t7.c @ 749:9334bdc30d60

Added enum for Co2 display
author Ideenmodellierer
date Mon, 13 Mar 2023 22:18:28 +0100
parents be25ab2d902c
children 6de83d8205a0
line wrap: on
line diff
--- a/Discovery/Src/t7.c	Sun Mar 05 22:14:53 2023 +0100
+++ b/Discovery/Src/t7.c	Mon Mar 13 22:18:28 2023 +0100
@@ -2929,6 +2929,23 @@
         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;
+        if(stateUsed->lifeData.CO2_data.CO2_ppm < CO2_WARNING_LEVEL_PPM)
+        {
+        	text[textpointer++] = '\020';
+        }
+        else if(stateUsed->lifeData.CO2_data.CO2_ppm < CO2_ALARM_LEVEL_PPM)
+        {
+        	text[textpointer++] = '\024';	/* yellow */
+        }
+        else
+        {
+        	text[textpointer++] = '\025'; 	/* red */
+        }
+        snprintf(&text[textpointer],TEXTSIZE,"\%5ldppm", stateUsed->lifeData.CO2_data.CO2_ppm);
+#endif
     case LLC_Compass:
         headerText[2] = TXT_2BYTE;
         headerText[3] = TXT2BYTE_Compass;