diff Discovery/Src/tMenuSystem.c @ 815:ce8f71217f45

Bugfix CustomView selection during dive mode: The CustomView selection during dive mode was limited to two pages, while meanwhile three are needed to show all options. The problem did not showup in surface mode selection. Rootcause was a static definition instead of the dynamic one used in surface mode. In addition with every page shift a new page was created which might cause display errors after some times. To solve this the pages are now updated instead of rebuilding the pages.
author Ideenmodellierer
date Sun, 03 Sep 2023 18:03:49 +0200
parents dd7ce655db26
children 9f487ad38170
line wrap: on
line diff
--- a/Discovery/Src/tMenuSystem.c	Sun Sep 03 17:58:12 2023 +0200
+++ b/Discovery/Src/tMenuSystem.c	Sun Sep 03 18:03:49 2023 +0200
@@ -59,6 +59,8 @@
     *tab = 300;
     *subtext = 0;
 
+    resetLineMask(StMSYS);
+
     // dive mode
     if(actual_menu_content != MENU_SURFACE)
     {
@@ -80,17 +82,34 @@
 					TXT_2BYTE, customview_TXT2BYTE_helper(id));
         	}
         }
-        text[textPointer++] = TXT_2BYTE;
-        text[textPointer++] = TXT2BYTE_ButtonNext;
-        text[textPointer] = 0;
 
         for(;i<5;i++)	/* clear empty lines in case menu shows less than 5 entries */
         {
         	text[textPointer++]='\n';
         	text[textPointer++]='\r';
         	text[textPointer] = 0;
+        	switch(i)
+			{
+        		case 0:	disableLine(StMSYS_Custom0);
+        			break;
+        		case 1:	disableLine(StMSYS_Custom1);
+        		    break;
+        		case 2:	disableLine(StMSYS_Custom2);
+        			break;
+        		case 3:	disableLine(StMSYS_Custom3);
+        		    break;
+        		case 4:	disableLine(StMSYS_Custom4);
+        		    break;
+        		default:
+        		case 5:	disableLine(StMSYS_Custom5);
+        		    break;
+			}
         }
 
+        text[textPointer++] = TXT_2BYTE;
+        text[textPointer++] = TXT2BYTE_ButtonNext;
+        text[textPointer] = 0;
+
         return StMSYS;
     }