diff Discovery/Src/tInfoSensor.c @ 1078:082825daccb5 Icon_Integration tip

Added control views for HUD: The HUD implementation may now be activated by the compile switch ENABLE_HUD_SUPPORT. The HUD will become visible onces detected in the CvOpt overview menu. The first implementation is for testing only => The LEDs may be operated by a number field. Positiv values activate the red, negativ the green LEDs. Depending on the value blink sequences will be scheduled. At the moment no dive specific data is mapped to the LED operation (like e.g. warnings).
author Ideenmodellierer
date Mon, 02 Mar 2026 17:30:38 +0100
parents ef99fff2d2de
children
line wrap: on
line diff
--- a/Discovery/Src/tInfoSensor.c	Mon Mar 02 17:22:25 2026 +0100
+++ b/Discovery/Src/tInfoSensor.c	Mon Mar 02 17:30:38 2026 +0100
@@ -202,6 +202,20 @@
 
 	tInfo_write_buttonTextline_simple(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_O2Calib);
 }
+
+static void refreshInfo_SensorHUD(GFX_DrawCfgScreen s)
+{
+	const SDiveState *pStateReal = stateRealGetPointer();
+    char text[50];
+
+    snprintf(text,50,"%s",pStateReal->lifeData.extIf_sensor_data[activeSensorId]);
+    tInfo_write_content_simple(  30, 770, ME_Y_LINE1, &FontT48, text, CLUT_Font020);
+
+	tInfo_write_buttonTextline_simple(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,0);
+}
+
+
+
 //  ===============================================================================
 void refreshInfo_Sensor(GFX_DrawCfgScreen s)
 {
@@ -222,7 +236,9 @@
 		case SENSOR_DIGO2M:	refreshInfo_SensorO2(s);
 			break;
 		case SENSOR_CO2:
-		case SENSOR_CO2M: refreshInfo_SensorCo2(s);
+		case SENSOR_CO2M: 	refreshInfo_SensorCo2(s);
+			break;
+		case SENSOR_HUD:	refreshInfo_SensorHUD(s);
 			break;
 	}
 }