diff Discovery/Src/tMenuSetpoint.c @ 811:4c41d9a18c7f

Added function to skip lines which are not needed for operation: It was not possible in the previous version to skip lines in the top level menu view which were not used for operation. In the past context sensitive menus as well as layout changes have been introduced which cause the cursor to be placed on lines without function. To avoid this it is not possible to mark a line as not in use by enabling / disabling it by the individual meni Id.
author Ideenmodellierer
date Sun, 27 Aug 2023 20:59:12 +0200
parents 25103f5c7e29
children c4ee952b9425
line wrap: on
line diff
--- a/Discovery/Src/tMenuSetpoint.c	Sun Aug 27 20:55:57 2023 +0200
+++ b/Discovery/Src/tMenuSetpoint.c	Sun Aug 27 20:59:12 2023 +0200
@@ -55,9 +55,16 @@
 
     if((actual_menu_content == MENU_SURFACE) || (stateUsed->diveSettings.diveMode != DIVEMODE_PSCR))	/* do not show setpoints in PSCR mode */
     {
+    	if (settings->autoSetpoint) {
+    	    disableLine(StMSP_Blank);
+    	}
+        else {
+        	enableLine(StMSP_Blank);
+        }
 		for(int spId=1;spId<=NUM_GASES;spId++)
 		{
             if (settings->autoSetpoint) {
+            	disableLine(StMSP_Blank);
                 if (spId == 5) {
                     if (actual_menu_content == MENU_SURFACE) {
                         textPointer += snprintf(&text[textPointer], 40, "\020%c%c\016\016%c%c\017 %c%c\002%c\n\r", TXT_2BYTE, TXT2BYTE_SetpointShort, TXT_2BYTE, TXT2BYTE_SetpointLow, TXT_2BYTE, TXT2BYTE_SetpointDelayed, settings->delaySetpointLow ? '\005' : '\006');