comparison 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
comparison
equal deleted inserted replaced
814:26ae9e8f24fd 815:ce8f71217f45
56 56
57 data = settingsGetPointer(); 57 data = settingsGetPointer();
58 textPointer = 0; 58 textPointer = 0;
59 *tab = 300; 59 *tab = 300;
60 *subtext = 0; 60 *subtext = 0;
61
62 resetLineMask(StMSYS);
61 63
62 // dive mode 64 // dive mode
63 if(actual_menu_content != MENU_SURFACE) 65 if(actual_menu_content != MENU_SURFACE)
64 { 66 {
65 uint8_t id; 67 uint8_t id;
78 textPointer += snprintf(&text[textPointer], 60, 80 textPointer += snprintf(&text[textPointer], 60,
79 "%c%c\n\r", 81 "%c%c\n\r",
80 TXT_2BYTE, customview_TXT2BYTE_helper(id)); 82 TXT_2BYTE, customview_TXT2BYTE_helper(id));
81 } 83 }
82 } 84 }
85
86 for(;i<5;i++) /* clear empty lines in case menu shows less than 5 entries */
87 {
88 text[textPointer++]='\n';
89 text[textPointer++]='\r';
90 text[textPointer] = 0;
91 switch(i)
92 {
93 case 0: disableLine(StMSYS_Custom0);
94 break;
95 case 1: disableLine(StMSYS_Custom1);
96 break;
97 case 2: disableLine(StMSYS_Custom2);
98 break;
99 case 3: disableLine(StMSYS_Custom3);
100 break;
101 case 4: disableLine(StMSYS_Custom4);
102 break;
103 default:
104 case 5: disableLine(StMSYS_Custom5);
105 break;
106 }
107 }
108
83 text[textPointer++] = TXT_2BYTE; 109 text[textPointer++] = TXT_2BYTE;
84 text[textPointer++] = TXT2BYTE_ButtonNext; 110 text[textPointer++] = TXT2BYTE_ButtonNext;
85 text[textPointer] = 0; 111 text[textPointer] = 0;
86
87 for(;i<5;i++) /* clear empty lines in case menu shows less than 5 entries */
88 {
89 text[textPointer++]='\n';
90 text[textPointer++]='\r';
91 text[textPointer] = 0;
92 }
93 112
94 return StMSYS; 113 return StMSYS;
95 } 114 }
96 115
97 // surface mode 116 // surface mode