comparison Discovery/Src/tMenu.c @ 816:c4ee952b9425

Fix a bug that disables arbitrary menu lines in dive mode if lines are disabled / inactive in surface mode. (mikeller)
author heinrichsweikamp
date Sun, 10 Sep 2023 11:46:45 +0200
parents ce8f71217f45
children 2a9a47547b05
comparison
equal deleted inserted replaced
815:ce8f71217f45 816:c4ee952b9425
127 text[(*textPointer)++] = '\r'; 127 text[(*textPointer)++] = '\r';
128 text[*textPointer] = 0; 128 text[*textPointer] = 0;
129 } 129 }
130 130
131 131
132 void clearDisabledMenuLines(void)
133 {
134 for(unsigned i = 0; i <= MAXPAGES; i++) {
135 menu.disableLineMask[i] = 0;
136 }
137 }
138
139
132 void tM_init(void) 140 void tM_init(void)
133 { 141 {
134 uint8_t i; 142 uint8_t i;
135 143
136 SSettings* pSettings; 144 SSettings* pSettings;
152 { 160 {
153 menu.lineMemoryForNavigationForPage[i] = 0; 161 menu.lineMemoryForNavigationForPage[i] = 0;
154 menu.StartAddressForPage[i] = 0; 162 menu.StartAddressForPage[i] = 0;
155 menu.linesAvailableForPage[i] = 0; 163 menu.linesAvailableForPage[i] = 0;
156 menu.shadowPage[i] = 0; 164 menu.shadowPage[i] = 0;
157 menu.disableLineMask[i] = 0; 165 }
158 } 166
167 clearDisabledMenuLines();
159 168
160 tMscreen.FBStartAdress = 0; 169 tMscreen.FBStartAdress = 0;
161 tMscreen.ImageHeight = 480; 170 tMscreen.ImageHeight = 480;
162 tMscreen.ImageWidth = 800; 171 tMscreen.ImageWidth = 800;
163 tMscreen.LayerIndex = 1; 172 tMscreen.LayerIndex = 1;