diff Discovery/Src/tMenuXtra.c @ 845:17d9d6eddd8d Evo_2_23

Added new PreDiveCheck info page: In case a DiveO2 sensor is connected to the OSTC than the values of the DiveO2 internal pressure and temperature sensors may be used for predive checks. The pressure sensors is used for over / under pressure test and the values are visualized using a graph to make it easier to check if the pressure keeps stable. The temperature measurement gives an indication if the scrubber is getting active. This view is highly dependend on the surface temperature but may be useful e.g. for diving in european area. In addition the values ofthe connected sensors are shown.
author Ideenmodellierer
date Sun, 21 Jan 2024 22:24:36 +0100
parents ffb1036c27c2
children bc2fcd002fc4
line wrap: on
line diff
--- a/Discovery/Src/tMenuXtra.c	Sun Jan 21 22:18:51 2024 +0100
+++ b/Discovery/Src/tMenuXtra.c	Sun Jan 21 22:24:36 2024 +0100
@@ -190,16 +190,33 @@
         }
 
 #ifdef ENABLE_PSCR_MODE
-        if(pSettings->dive_mode == DIVEMODE_PSCR)
+        if((line == 0) || (line == 4))
+         {
+			if(pSettings->dive_mode == DIVEMODE_PSCR)
+			{
+				textPointer += snprintf(&text[textPointer], 60, "%c",TXT_PSClosedCircuit);
+				enableLine(StMXTRA_PSCR_O2_Drop);
+			}
+			else
+			{
+				text[textPointer++] = '\031';		/* change text color */
+				textPointer += snprintf(&text[textPointer], 60,"%c",TXT_PSClosedCircuit);
+				text[textPointer++] = '\020';		/* restore text color */
+				disableLine(StMXTRA_PSCR_O2_Drop);
+			}
+            strcpy(&text[textPointer],"\n\r");
+            textPointer += 2;
+         }
+#endif
+        if((pSettings->ppo2sensors_source == O2_SENSOR_SOURCE_ANADIG) || (pSettings->ppo2sensors_source == O2_SENSOR_SOURCE_DIGITAL))
         {
-            if((line == 0) || (line == 4))
-             {
-                 textPointer += snprintf(&text[textPointer], 60,\
-                             "%c"
-                             ,TXT_PSClosedCircuit);
-             }
+        	if((line == 0) || (line == 5))
+        	{
+        	                 textPointer += snprintf(&text[textPointer], 60,\
+        	                             "%c"
+        	                             ,TXT_PreDive);
+        	}
         }
-#endif
     }
     return StMXTRA;
 }