diff Discovery/Src/t7.c @ 756:6de83d8205a0

Added visualization of CO2 during dive: In the previous version CO2 values were available in sufrace mode only. Now the display of Co2 value has been added to the lower left corner view. In addition a Co2 alarm has been added. Early Co2 warning vaues will be displayed in yellow while critical values are shown in red.
author Ideenmodellierer
date Tue, 07 Mar 2023 20:02:05 +0100
parents 9334bdc30d60
children b6d8a6fbf4fd
line wrap: on
line diff
--- a/Discovery/Src/t7.c	Tue Mar 07 19:59:02 2023 +0100
+++ b/Discovery/Src/t7.c	Tue Mar 07 20:02:05 2023 +0100
@@ -1412,6 +1412,7 @@
     //count += stateUsed->warnings.lowBattery;
     count += stateUsed->warnings.sensorLinkLost;
     count += stateUsed->warnings.fallback;
+    count += stateUsed->warnings.co2High;
 #ifdef ENABLE_BOTTLE_SENSOR
     if(stateUsed->warnings.newPressure)
     {
@@ -1563,6 +1564,18 @@
         lineFree--;
     }
 #endif
+#ifdef ENABLE_CO2_SUPPORT
+    if(lineFree && stateUsed->warnings.co2High)
+    {
+    	text[textpointer++] = '\001';
+        text[textpointer++] = TXT_2BYTE;
+        text[textpointer++] = TXT2BYTE_WarnCO2High;
+        text[textpointer++] = '\n';
+        text[textpointer++] = '\r';
+        text[textpointer] = 0;
+        lineFree--;
+    }
+#endif
 /*
     if(lineFree && stateUsed->warnings.lowBattery)
     {