diff Discovery/Src/settings.c @ 1082:1aa45000f92c Icon_Integration tip

Added configuration menu for HUD functions: The V1 HUD has 4 functions (holes) which may be realized by one or two LEDs. The functions (like ppo2 monitoring or ascent speed) may be configurated by the diver using the HUD menu. The functions which may be selected depend on the HW configuration (e.g. the connected sensors) and the number of LEDs which are needed to realize the function. The previous HUD test implementation may still be activate usind the compile switch ENABLE_HUD_TESTING
author Ideenmodellierer
date Sun, 15 Mar 2026 21:40:35 +0100
parents 3c3fb9f4edc4
children
line wrap: on
line diff
--- a/Discovery/Src/settings.c	Sun Mar 15 21:28:53 2026 +0100
+++ b/Discovery/Src/settings.c	Sun Mar 15 21:40:35 2026 +0100
@@ -40,6 +40,7 @@
 #include "motion.h"
 #include "t7.h"
 #include "data_central.h"
+#include "hud.h"
 
 static uint8_t settingsWarning = 0;		/* Active if setting values have been corrected */
 static SSettingsStatus SettingsStatus;  /* Structure containing number of corrections and first occurrence */
@@ -95,7 +96,7 @@
  * There might even be entries with fixed values that have no range
  */
 const SSettings SettingsStandard = {
-    .header = 0xFFFF002E,
+    .header = 0xFFFF002F,
     .warning_blink_dsec = 8 * 2,
     .lastDiveLogId = 0,
     .logFlashNextSampleStartAddress = SAMPLESTART,
@@ -355,6 +356,12 @@
     .profileName[2] = "MCCR____",
     .profileName[3] = "ECCR____",
 	.activeProfile = 0,
+	.hudFunction[0] = HUD_FCT_NONE,
+    .hudFunction[1] = HUD_FCT_NONE,
+    .hudFunction[2] = HUD_FCT_NONE,
+    .hudFunction[3] = HUD_FCT_NONE,
+    .hudFunction[4] = HUD_FCT_NONE,
+    .hudFunction[5] = HUD_FCT_NONE
 };
 
 /* Private function prototypes -----------------------------------------------*/
@@ -667,7 +674,13 @@
     	{
     		pSettings->tX_userselectedLeftLowerCornerPrimary++;
     	}
-
+    	// no break;
+    case 0xFFFF002E:	pSettings->hudFunction[0] = HUD_FCT_NONE;				/* todo: define default setup */
+    					pSettings->hudFunction[1] = HUD_FCT_NONE;
+    					pSettings->hudFunction[2] = HUD_FCT_NONE;
+    					pSettings->hudFunction[3] = HUD_FCT_NONE;
+    					pSettings->hudFunction[4] = HUD_FCT_NONE;
+    					pSettings->hudFunction[5] = HUD_FCT_NONE;
     	// no break;
     default:
         pSettings->header = pStandard->header;