diff Discovery/Src/tMenu.c @ 981:c6c781a2e85b default

Merge into default
author heinrichsweikamp
date Tue, 11 Feb 2025 18:12:00 +0100
parents e9c37071933b
children 8507a87f6401
line wrap: on
line diff
--- a/Discovery/Src/tMenu.c	Tue Aug 13 13:24:54 2024 +0200
+++ b/Discovery/Src/tMenu.c	Tue Feb 11 18:12:00 2025 +0100
@@ -261,6 +261,13 @@
 	}
 }
 
+uint8_t getLineMask(uint32_t lineId)
+{
+	SStateList idList;
+	get_idSpecificStateList(lineId, &idList);
+	return(menu.disableLineMask[idList.page]);
+}
+
 void resetLineMask(uint32_t lineId)
 {
 	SStateList idList;
@@ -591,7 +598,10 @@
     if((isLoopMode(pSettings->dive_mode)) || (stateUsed->diveSettings.ccrOption == 1))
     {
         tM_add(StMCG);
-        tM_add(StMSP);
+        if((stateUsed->diveSettings.diveMode != DIVEMODE_PSCR) || (actual_menu_content != MENU_SURFACE))
+        {
+        	tM_add(StMSP);
+        }
         if (actual_menu_content == MENU_SURFACE)  /* StMOG is now accessed using StMCG in CCR mode*/
         {
         	tM_add(StMXTRA);
@@ -854,6 +864,8 @@
     if((page == 0) || (line == 0))
         return;
 
+    requestBuzzerActivation(0);
+
     menu.pageMemoryForNavigation = page;
     /* new test for 3button design */
     if(freshWithFlipPages)
@@ -931,6 +943,18 @@
     block_diluent_handler(1);
 }
 
+static void checkLineStatus()
+{
+	switch(get_globalState())
+	{
+		case StMSYS: tMSystem_checkLineStatus();
+			break;
+		case StMXTRA: tMXtra_checkLineStatus();
+			break;
+		default:
+			break;
+	}
+}
 
 static void nextPage(void)
 {
@@ -950,6 +974,8 @@
 
     set_globalState_Menu_Page(page);
 
+    checkLineStatus();		/* some lines may be enabled / disabled depending on condition occuring outside the page scope => check if update is necessary */
+
     change_CLUT_entry(CLUT_MenuLineSelectedSides, 		(CLUT_MenuPageGasOC + page - 1));
     change_CLUT_entry(CLUT_MenuLineSelectedSeperator, (CLUT_MenuPageGasOC + page - 1));