diff Discovery/Src/tMenu.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 4c41d9a18c7f
children c4ee952b9425
line wrap: on
line diff
--- a/Discovery/Src/tMenu.c	Sun Sep 03 17:58:12 2023 +0200
+++ b/Discovery/Src/tMenu.c	Sun Sep 03 18:03:49 2023 +0200
@@ -252,6 +252,15 @@
 	}
 }
 
+void resetLineMask(uint32_t lineId)
+{
+	SStateList idList;
+	get_idSpecificStateList(lineId, &idList);
+	if(idList.page < MAXPAGES)
+	{
+		menu.disableLineMask[idList.page] = 0;
+	}
+}
 void enableLine(uint32_t lineId)
 {
 	SStateList idList;
@@ -480,9 +489,13 @@
     if(line == 0)
         line = 1;
 
-    if(menu.disableLineMask[page] & ( 1 << line))
+    while(menu.disableLineMask[page] & ( 1 << line))
     {
     	line++;
+    	if(line > menu.linesAvailableForPage[page])
+    	{
+    	    line = 1;
+    	}
     }
 
     if(line > menu.linesAvailableForPage[page])
@@ -712,6 +725,11 @@
         tMSP_refresh(text, &tabPosition, subtext);
         update_content_with_new_frame(page, text, tabPosition, subtext);
         break;
+    case StMSYS:
+    	tMSystem_refresh(0, text, &tabPosition, NULL);
+    	update_content_with_new_frame(page, text, tabPosition, subtext);
+    	break;
+
     default:
         break;
     }