Mercurial > public > ostc4
annotate Discovery/Src/tMenu.c @ 550:af1c3e3abd5f
Make sure motion detection settings are set to default values:
In case the feature has been disabled by compile switch the default value shall be used to make sure SW is in a defined state. Usefull if switching between development and production software
author | Ideenmodellierer |
---|---|
date | Sun, 08 Nov 2020 18:38:53 +0100 |
parents | e221cf762f45 |
children | 15f6f0b5786c |
rev | line source |
---|---|
38 | 1 /////////////////////////////////////////////////////////////////////////////// |
2 /// -*- coding: UTF-8 -*- | |
3 /// | |
4 /// \file Discovery/Src/tMenu.c | |
5 /// \brief Major menu with extra page 0 for edit functionality since V0.0.2 | |
6 /// \author heinrichs weikamp gmbh | |
7 /// \date 30-April-2014 | |
8 /// | |
9 /// \details | |
10 /// | |
11 /// $Id$ | |
12 /////////////////////////////////////////////////////////////////////////////// | |
13 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh | |
14 /// | |
15 /// This program is free software: you can redistribute it and/or modify | |
16 /// it under the terms of the GNU General Public License as published by | |
17 /// the Free Software Foundation, either version 3 of the License, or | |
18 /// (at your option) any later version. | |
19 /// | |
20 /// This program is distributed in the hope that it will be useful, | |
21 /// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
22 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
23 /// GNU General Public License for more details. | |
24 /// | |
25 /// You should have received a copy of the GNU General Public License | |
26 /// along with this program. If not, see <http://www.gnu.org/licenses/>. | |
27 ////////////////////////////////////////////////////////////////////////////// | |
28 | |
29 /* Includes ------------------------------------------------------------------*/ | |
30 #include "tMenu.h" | |
31 | |
32 #include "gfx_fonts.h" | |
33 #include "tHome.h" | |
34 #include "tMenuDeco.h" | |
35 #include "tMenuDecoParameter.h" | |
36 #include "tMenuEditDeco.h" | |
37 #include "tMenuEditDecoParameter.h" | |
38 #include "tMenuEditGasOC.h" | |
39 #include "tMenuEditHardware.h" | |
40 #include "tMenuEditPlanner.h" | |
41 #include "tMenuEditSetpoint.h" | |
42 #include "tMenuEditSystem.h" | |
43 #include "tMenuEditXtra.h" | |
507 | 44 #include "tMenuEditCustom.h" |
38 | 45 #include "tMenuGas.h" |
46 #include "tMenuHardware.h" | |
47 #include "tMenuPlanner.h" | |
48 #include "tMenuSetpoint.h" | |
49 #include "tMenuSystem.h" | |
50 #include "tMenuXtra.h" | |
507 | 51 #include "tMenuCustom.h" |
38 | 52 |
53 /* Private types -------------------------------------------------------------*/ | |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
507
diff
changeset
|
54 #define MAXPAGES 11 |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
55 #define CURSOR_HIGH 25 |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
56 #define TAB_HEADER_HIGH 25 |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
57 #define TAB_BAR_HIGH 5 |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
58 #define MENU_WDW_HIGH 390 |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
59 #define KEY_LABEL_HIGH 25 /* Height of the label used for the the user keys */ |
38 | 60 |
61 typedef struct | |
62 { | |
63 uint32_t StartAddressForPage[MAXPAGES+1]; | |
64 uint8_t lineMemoryForNavigationForPage[MAXPAGES+1]; | |
65 uint8_t pageMemoryForNavigation; | |
66 uint8_t linesAvailableForPage[MAXPAGES+1]; | |
67 uint8_t pagesAvailable; | |
68 uint8_t pageCountNumber[MAXPAGES+1]; | |
69 uint8_t pageCountTotal; | |
70 uint8_t modeFlipPages; | |
71 } SMenuMemory; | |
72 | |
73 /* Exported variables --------------------------------------------------------*/ | |
74 | |
75 /* Announced Private variables -----------------------------------------------*/ | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
76 static GFX_DrawCfgScreen tMdesignSolo; |
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
77 static GFX_DrawCfgScreen tMdesignCursor; |
38 | 78 |
79 /* Private variables ---------------------------------------------------------*/ | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
80 static GFX_DrawCfgWindow tMwindow; |
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
81 static GFX_DrawCfgScreen tMscreen; |
38 | 82 |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
83 static SMenuMemory menu; |
38 | 84 |
85 uint8_t actual_menu_content = MENU_UNDEFINED; | |
86 | |
87 /* Private function prototypes -----------------------------------------------*/ | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
88 static void draw_tMheader(uint8_t page); |
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
89 static void draw_tMcursorDesign(void); |
38 | 90 |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
91 static void draw_tMdesignSubUnselected(uint32_t *ppDestination); |
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
92 static void draw_tMdesignSubSelected(uint32_t *ppDestination); |
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
93 static void draw_tMdesignSubSelectedBorder(uint32_t *ppDestination); |
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
94 static void tMenu_write(uint8_t page, char *text, char *subtext); |
38 | 95 |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
96 static void clean_line_actual_page(void); |
38 | 97 void tM_build_pages(void); |
98 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
99 static void gotoMenuEdit(void); |
38 | 100 |
101 /* Exported functions --------------------------------------------------------*/ | |
102 | |
103 GFX_DrawCfgScreen * get_PointerMenuCursorScreen(void) | |
104 { | |
105 return &tMdesignCursor; | |
106 } | |
107 | |
108 | |
109 GFX_DrawCfgScreen * get_PointerMenuCursorDesignSoloScreen(void) | |
110 { | |
111 return &tMdesignSolo; | |
112 } | |
113 | |
114 | |
115 void nextline(char * text, uint8_t *textPointer) | |
116 { | |
117 text[(*textPointer)++] = '\n'; | |
118 text[(*textPointer)++] = '\r'; | |
119 text[*textPointer] = 0; | |
120 } | |
121 | |
122 | |
123 void tM_init(void) | |
124 { | |
125 uint8_t i; | |
126 | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
127 SSettings* pSettings; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
128 pSettings = settingsGetPointer(); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
129 |
38 | 130 tMdesignCursor.FBStartAdress = getFrame(3); |
131 tMdesignCursor.ImageHeight = 390; | |
132 tMdesignCursor.ImageWidth = 800; | |
133 tMdesignCursor.LayerIndex = 0; | |
134 | |
135 tMdesignSolo.FBStartAdress = getFrame(4); | |
136 tMdesignSolo.ImageHeight = 390; | |
137 tMdesignSolo.ImageWidth = 800; | |
138 tMdesignSolo.LayerIndex = 0; | |
139 | |
140 menu.pagesAvailable = 0; | |
141 menu.pageMemoryForNavigation = 0; | |
142 for(i=0;i<=MAXPAGES;i++) | |
143 { | |
144 menu.lineMemoryForNavigationForPage[i] = 0; | |
145 menu.StartAddressForPage[i] = 0; | |
146 menu.linesAvailableForPage[i] = 0; | |
147 } | |
148 | |
149 tMscreen.FBStartAdress = 0; | |
150 tMscreen.ImageHeight = 480; | |
151 tMscreen.ImageWidth = 800; | |
152 tMscreen.LayerIndex = 1; | |
153 | |
154 draw_tMcursorDesign(); | |
155 | |
156 tMwindow.Image = &tMscreen; | |
157 tMwindow.WindowNumberOfTextLines = 6; | |
158 tMwindow.WindowLineSpacing = 65; | |
159 tMwindow.WindowTab = 400; | |
160 tMwindow.WindowX0 = 20; | |
161 tMwindow.WindowX1 = 779; | |
162 | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
163 if(!pSettings->FlipDisplay) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
164 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
165 tMwindow.WindowY0 = 4 + KEY_LABEL_HIGH; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
166 tMwindow.WindowY1 = 390 + KEY_LABEL_HIGH; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
167 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
168 else |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
169 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
170 tMwindow.WindowY0 = 480 - MENU_WDW_HIGH - TAB_HEADER_HIGH;// - TAB_BAR_HIGH; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
171 tMwindow.WindowY1 = 480 - TAB_HEADER_HIGH - TAB_BAR_HIGH; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
172 } |
38 | 173 actual_menu_content = MENU_UNDEFINED; |
174 } | |
175 | |
176 void tM_refresh(char *text, uint8_t *textPointer, uint8_t line, const char content[6]) | |
177 { | |
178 for(uint8_t i=0; i<6; i++) | |
179 { | |
180 if(((line == 0) || (line == i)) && content[i]) | |
181 { | |
182 text[(*textPointer)++] = content[i]; | |
183 } | |
184 text[(*textPointer)++] = '\n'; | |
185 text[(*textPointer)++] = '\r'; | |
186 text[*textPointer] = 0; | |
187 } | |
188 } | |
189 | |
190 | |
191 void tM_rebuild_pages(void) | |
192 { | |
193 menu.pagesAvailable = 0; | |
194 // menu.pageMemoryForNavigation = 0; | |
195 for(int i=0;i<=MAXPAGES;i++) | |
196 { | |
197 menu.lineMemoryForNavigationForPage[i] = 0; | |
198 menu.linesAvailableForPage[i] = 0; | |
199 menu.StartAddressForPage[i] = 0; // only with GFX_forceReleaseFramesWithId(5); !!!!! | |
200 } | |
201 GFX_forceReleaseFramesWithId(5); | |
202 tM_build_pages(); | |
203 } | |
204 | |
205 | |
206 void tM_rebuild_menu_after_tComm(void) | |
207 { | |
208 tM_rebuild_pages(); | |
209 } | |
210 | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
211 void tM_check_content(void) |
38 | 212 { |
213 uint8_t mode = 0; | |
214 | |
215 if(stateUsed->mode == MODE_DIVE) | |
216 { | |
217 if(stateUsed == stateRealGetPointer()) | |
218 mode = MENU_DIVE_REAL; | |
219 else | |
220 mode = MENU_DIVE_SIM; | |
221 } | |
222 else | |
223 mode = MENU_SURFACE; | |
224 | |
225 if(actual_menu_content != mode) | |
226 { | |
227 actual_menu_content = mode; | |
228 tM_rebuild_pages(); | |
229 } | |
230 } | |
231 | |
232 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
233 static void clean_line_actual_page(void) |
38 | 234 { |
235 uint8_t line, page; | |
236 | |
237 page = menu.pageMemoryForNavigation; | |
238 line = menu.lineMemoryForNavigationForPage[page]; | |
122
871baf20776b
Take care for display orientation if deleting lines
Ideenmodellierer
parents:
110
diff
changeset
|
239 if(settingsGetPointer()->FlipDisplay) /* Reselect line to be deleted if display is rotated */ |
871baf20776b
Take care for display orientation if deleting lines
Ideenmodellierer
parents:
110
diff
changeset
|
240 { |
871baf20776b
Take care for display orientation if deleting lines
Ideenmodellierer
parents:
110
diff
changeset
|
241 line = 6 - line + 1; |
871baf20776b
Take care for display orientation if deleting lines
Ideenmodellierer
parents:
110
diff
changeset
|
242 } |
38 | 243 tMscreen.FBStartAdress = menu.StartAddressForPage[page]; |
244 GFX_clean_line(&tMwindow, line); | |
245 } | |
246 | |
247 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
248 static void update_content_actual_page(char *text, uint16_t tab, char *subtext) |
38 | 249 { |
250 uint8_t page; | |
251 | |
252 page = menu.pageMemoryForNavigation; | |
253 | |
254 tMscreen.FBStartAdress = menu.StartAddressForPage[page]; | |
255 if(tab == 0) | |
256 tMwindow.WindowTab = 400; | |
257 else | |
258 tMwindow.WindowTab = tab; | |
259 | |
260 tMenu_write(page, text, subtext); | |
261 } | |
262 | |
263 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
264 static void update_content_with_new_frame(uint8_t page, char *text, uint16_t tab, char *subtext) |
38 | 265 { |
266 char localtext[32]; | |
267 | |
268 uint32_t rememberPage = menu.StartAddressForPage[page]; | |
269 menu.StartAddressForPage[page] = getFrame(5); | |
270 tMscreen.FBStartAdress = menu.StartAddressForPage[page]; | |
271 | |
272 if(tab == 0) | |
273 tMwindow.WindowTab = 400; | |
274 else | |
275 tMwindow.WindowTab = tab; | |
276 | |
277 draw_tMheader(page); | |
278 tMenu_write(page, text, subtext); | |
279 | |
280 localtext[0] = TXT_2BYTE; | |
281 localtext[1] = TXT2BYTE_ButtonBack; | |
282 localtext[2] = 0; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
283 write_content_simple(&tMscreen, 0, 800, 480-KEY_LABEL_HIGH, &FontT24,localtext,CLUT_ButtonSurfaceScreen); |
38 | 284 |
285 localtext[0] = '\001'; | |
286 localtext[1] = TXT_2BYTE; | |
287 localtext[2] = TXT2BYTE_ButtonEnter; | |
288 localtext[3] = 0; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
289 write_content_simple(&tMscreen, 0, 800, 480-KEY_LABEL_HIGH, &FontT24,localtext,CLUT_ButtonSurfaceScreen); |
38 | 290 |
291 localtext[0] = '\002'; | |
292 localtext[1] = TXT_2BYTE; | |
293 localtext[2] = TXT2BYTE_ButtonNext; | |
294 localtext[3] = 0; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
295 write_content_simple(&tMscreen, 0, 800, 480-KEY_LABEL_HIGH, &FontT24,localtext,CLUT_ButtonSurfaceScreen); |
38 | 296 |
297 // gfx_write_page_number(&tMscreen ,menu.pageCountNumber[page],menu.pageCountTotal,0); | |
298 | |
299 if(page == menu.pageMemoryForNavigation) | |
300 GFX_SetFrameTop(tMscreen.FBStartAdress); | |
301 releaseFrame(5,rememberPage); | |
302 } | |
303 | |
304 | |
169
842f57bbaaad
Bugfix: highlight the menu underline correctly on selected state
Jan Mulder <jlmulder@xs4all.nl>
parents:
167
diff
changeset
|
305 static void tM_create_pagenumbering(void) |
38 | 306 { |
307 menu.pageCountTotal = 0; | |
308 | |
309 for(int i=0;i<=MAXPAGES;i++) | |
310 { | |
311 if(menu.pageCountNumber[i]) | |
312 { | |
313 menu.pageCountTotal++; | |
314 menu.pageCountNumber[i] = menu.pageCountTotal; | |
315 } | |
316 } | |
317 } | |
318 | |
319 | |
379 | 320 void tM_build_page(uint32_t id, char *text, uint16_t tab, char *subtext) |
38 | 321 { |
322 uint8_t linesFound; | |
323 uint16_t i; | |
324 SStateList idList; | |
325 uint8_t page; | |
326 | |
327 char localtext[32]; | |
328 | |
329 if(menu.pagesAvailable > MAXPAGES) | |
330 return; | |
331 | |
332 get_idSpecificStateList(id, &idList); | |
333 | |
334 if(idList.base != BaseMenu) | |
335 return; | |
336 | |
337 if(idList.page == 0) | |
338 return; | |
339 | |
340 if(idList.page > MAXPAGES) | |
341 return; | |
342 | |
343 page = idList.page; | |
344 | |
345 if(!menu.pageCountNumber[page]) | |
346 return; | |
347 | |
348 if(menu.pagesAvailable == 0) | |
349 tM_create_pagenumbering(); | |
350 | |
351 if(*text == 0) | |
352 return; | |
353 | |
354 linesFound = 1; | |
355 | |
356 if(menu.StartAddressForPage[page]) | |
357 releaseFrame(5,menu.StartAddressForPage[page]); | |
358 | |
359 menu.StartAddressForPage[page] = getFrame(5); | |
360 | |
361 if(menu.StartAddressForPage[page] == 0) | |
362 return; | |
363 | |
364 i = 0; | |
365 while((i < MAX_PAGE_TEXTSIZE) && text[i]) | |
366 { | |
367 if((text[i] == '\n') && ((i + 2) < MAX_PAGE_TEXTSIZE) && text[i+1] && text[i+2]) | |
368 linesFound += 1; | |
369 i++; | |
370 } | |
371 | |
372 menu.linesAvailableForPage[page] = linesFound; | |
373 menu.pagesAvailable++; /* even if it was used before */ | |
374 | |
375 tMscreen.FBStartAdress = menu.StartAddressForPage[page]; | |
376 if(tab == 0) | |
377 tMwindow.WindowTab = 400; | |
378 else | |
379 tMwindow.WindowTab = tab; | |
380 | |
381 draw_tMheader(page); | |
382 | |
383 tMenu_write(page, text, subtext); | |
384 | |
385 localtext[0] = TXT_2BYTE; | |
386 localtext[1] = TXT2BYTE_ButtonBack; | |
387 localtext[2] = 0; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
388 write_content_simple(&tMscreen, 0, 800, 480-KEY_LABEL_HIGH, &FontT24,localtext,CLUT_ButtonSurfaceScreen); |
38 | 389 |
390 localtext[0] = '\001'; | |
391 localtext[1] = TXT_2BYTE; | |
392 localtext[2] = TXT2BYTE_ButtonEnter; | |
393 localtext[3] = 0; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
394 write_content_simple(&tMscreen, 0, 800, 480-KEY_LABEL_HIGH, &FontT24,localtext,CLUT_ButtonSurfaceScreen); |
38 | 395 |
396 localtext[0] = '\002'; | |
397 localtext[1] = TXT_2BYTE; | |
398 localtext[2] = TXT2BYTE_ButtonNext; | |
399 localtext[3] = 0; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
400 write_content_simple(&tMscreen, 0, 800, 480-KEY_LABEL_HIGH, &FontT24,localtext,CLUT_ButtonSurfaceScreen); |
38 | 401 } |
402 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
403 static void findValidPosition(uint8_t *pageOuput, uint8_t *lineOutput) |
38 | 404 { |
51
8f8ea3a32e82
Resolved warnings pointing to possible invalid memory access
Ideenmodellierer
parents:
38
diff
changeset
|
405 uint8_t page = 0; |
8f8ea3a32e82
Resolved warnings pointing to possible invalid memory access
Ideenmodellierer
parents:
38
diff
changeset
|
406 uint8_t line = 0; |
8f8ea3a32e82
Resolved warnings pointing to possible invalid memory access
Ideenmodellierer
parents:
38
diff
changeset
|
407 uint8_t first = 0; |
38 | 408 |
409 *pageOuput = 0; | |
410 *lineOutput = 0; | |
411 | |
412 /* test */ | |
413 if(menu.pagesAvailable == 0) | |
414 return; | |
415 | |
416 for(int i=1;i<=MAXPAGES;i++) | |
417 { | |
418 if((menu.pageCountNumber[i] != 0) | |
419 && (menu.linesAvailableForPage[i] != 0) | |
420 && (menu.StartAddressForPage[i] != 0)) | |
421 { | |
422 first = i; | |
423 break; | |
424 } | |
425 } | |
426 | |
427 /* select */ | |
428 if(menu.pageMemoryForNavigation > MAXPAGES) | |
429 menu.pageMemoryForNavigation = first; | |
430 | |
431 page = menu.pageMemoryForNavigation; | |
432 | |
433 if(page == 0) | |
434 page = first; | |
435 | |
436 while((page <= MAXPAGES) && ((menu.linesAvailableForPage[page] == 0) || (menu.StartAddressForPage[page] == 0) || (menu.pageCountNumber[page] == 0))) | |
437 page += 1; | |
438 | |
439 if(page > MAXPAGES) | |
440 page = first; | |
441 | |
442 line = menu.lineMemoryForNavigationForPage[page]; | |
443 | |
444 if(line == 0) | |
445 line = 1; | |
446 | |
447 if(line > menu.linesAvailableForPage[page]) | |
448 line = 1; | |
449 | |
450 *pageOuput = page; | |
451 *lineOutput = line; | |
452 } | |
453 | |
454 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
455 static void tM_add(uint32_t id) |
38 | 456 { |
457 SStateList idList; | |
458 uint8_t page; | |
459 | |
460 get_idSpecificStateList(id, &idList); | |
461 | |
462 page = idList.page; | |
463 | |
464 if(page > MAXPAGES) | |
465 return; | |
466 | |
467 menu.pageCountNumber[page] = 1; | |
468 } | |
469 | |
470 | |
471 void tM_build_pages(void) | |
472 { | |
473 char text[MAX_PAGE_TEXTSIZE]; | |
474 char subtext[MAX_PAGE_TEXTSIZE]; | |
475 uint32_t id; | |
476 uint16_t tabPosition; | |
477 SSettings *pSettings = settingsGetPointer(); | |
478 | |
479 menu.pagesAvailable = 0; | |
480 for(int i=0;i<=MAXPAGES;i++) | |
481 menu.pageCountNumber[i] = 0; | |
482 | |
483 tabPosition = 400; | |
484 *text = 0; | |
485 *subtext = 0; | |
486 | |
487 /* 2015 Feb 02, hw | |
488 * max 8 Menu Pages | |
489 */ | |
490 | |
491 | |
492 tM_add(StMSYS); //now in both modes | |
493 if(actual_menu_content == MENU_SURFACE) | |
494 { | |
495 tM_add(StMDECO); | |
496 tM_add(StMHARD); | |
507 | 497 tM_add(StMCustom); |
38 | 498 // tM_add(StMSYS); now in both modes |
499 } | |
500 else | |
501 { | |
502 tM_add(StMXTRA); | |
503 } | |
504 if(actual_menu_content == MENU_SURFACE) | |
505 { | |
506 tM_add(StMPLAN); | |
507 } | |
508 // if((pSettings->dive_mode != DIVEMODE_Gauge) && (pSettings->dive_mode != DIVEMODE_Apnea)) | |
509 // { | |
510 tM_add(StMOG); | |
511 tM_add(StMDECOP); | |
512 // } | |
513 if((pSettings->dive_mode == DIVEMODE_CCR) || (stateUsed->diveSettings.ccrOption == 1)) | |
514 { | |
515 tM_add(StMCG); | |
516 tM_add(StMSP); | |
517 } | |
518 | |
519 id = tMOG_refresh(0, text, &tabPosition, subtext); | |
520 tM_build_page(id, text, tabPosition, subtext); | |
521 | |
522 id = tMCG_refresh(0, text, &tabPosition, subtext); | |
523 tM_build_page(id, text, tabPosition, subtext); | |
524 | |
525 id = tMSP_refresh(0, text, &tabPosition, subtext); | |
526 tM_build_page(id, text, tabPosition, subtext); | |
527 | |
528 id = tMXtra_refresh(0, text, &tabPosition, subtext); | |
529 tM_build_page(id, text, tabPosition, subtext); | |
530 | |
531 id = tMPlanner_refresh(0, text, &tabPosition, subtext); | |
532 tM_build_page(id, text, tabPosition, subtext); | |
533 | |
534 id = tMDeco_refresh(0, text, &tabPosition, subtext); | |
535 tM_build_page(id, text, tabPosition, subtext); | |
536 | |
537 id = tMDecoParameters_refresh(0, text, &tabPosition, subtext); | |
538 tM_build_page(id, text, tabPosition, subtext); | |
539 | |
540 id = tMPlanner_refresh(0, text, &tabPosition, subtext); | |
541 tM_build_page(id, text, tabPosition, subtext); | |
542 | |
543 id = tMHardware_refresh(0, text, &tabPosition, subtext); | |
544 tM_build_page(id, text, tabPosition, subtext); | |
545 | |
546 id = tMSystem_refresh(0, text, &tabPosition, subtext); | |
547 tM_build_page(id, text, tabPosition, subtext); | |
507 | 548 |
549 id = tMCustom_refresh(0, text, &tabPosition, subtext); | |
550 tM_build_page(id, text, tabPosition, subtext); | |
38 | 551 } |
552 | |
553 | |
554 void tM_refresh_live_content(void) | |
555 { | |
51
8f8ea3a32e82
Resolved warnings pointing to possible invalid memory access
Ideenmodellierer
parents:
38
diff
changeset
|
556 uint8_t page = 0; |
38 | 557 char text[MAX_PAGE_TEXTSIZE]; |
558 char subtext[MAX_PAGE_TEXTSIZE]; | |
559 uint16_t tabPosition; | |
560 | |
561 if((get_globalState() == StMSYS) && (actual_menu_content == MENU_SURFACE)) | |
562 { | |
563 page = menu.pageMemoryForNavigation; | |
564 tMSystem_refresh(0, text, &tabPosition, subtext); | |
565 update_content_with_new_frame(page, text, tabPosition, subtext); | |
566 } | |
567 else | |
568 if(get_globalState() == StMHARD) | |
569 { | |
570 page = menu.pageMemoryForNavigation; | |
571 tMHardware_refresh(0, text, &tabPosition, subtext); | |
572 update_content_with_new_frame(page, text, tabPosition, subtext); | |
573 } | |
574 | |
575 tMscreen.FBStartAdress = menu.StartAddressForPage[page]; | |
576 tHome_show_lost_connection_count(&tMscreen); | |
577 /* | |
578 SStateList idList; | |
579 if(actual_menu_content == MENU_SURFACE) | |
580 { | |
581 page = menu.pageMemoryForNavigation; | |
582 get_idSpecificStateList(StMSYS, &idList); | |
583 if(page == idList.page) | |
584 { | |
585 tMSystem_refresh(0, text, &tabPosition, subtext); | |
586 update_content_with_new_frame(page, text, tabPosition, subtext); | |
587 } | |
588 } | |
589 */ | |
590 } | |
591 | |
592 | |
593 /* new frame only! */ | |
594 void updateSpecificMenu(uint32_t id) | |
595 { | |
596 uint8_t page; | |
597 SStateList idList; | |
598 | |
599 char text[MAX_PAGE_TEXTSIZE]; | |
600 char subtext[MAX_PAGE_TEXTSIZE]; | |
601 uint16_t tabPosition; | |
602 | |
603 *subtext = 0; | |
604 *text = 0; | |
605 tabPosition = 400; | |
606 | |
607 get_idSpecificStateList(id, &idList); | |
608 page = idList.page; | |
609 | |
610 switch(id) | |
611 { | |
612 case StMOG: | |
613 tMOG_refresh(0, text, &tabPosition, subtext); | |
614 update_content_with_new_frame(page, text, tabPosition, subtext); | |
615 break; | |
616 case StMCG: | |
617 tMCG_refresh(0, text, &tabPosition, subtext); | |
618 update_content_with_new_frame(page, text, tabPosition, subtext); | |
619 break; | |
620 case StMSP: | |
621 tMSP_refresh(0, text, &tabPosition, subtext); | |
622 update_content_with_new_frame(page, text, tabPosition, subtext); | |
623 break; | |
624 default: | |
625 break; | |
626 } | |
627 } | |
628 | |
629 | |
630 void updateMenu(void) | |
631 { | |
632 uint8_t page, line; | |
633 | |
634 char text[MAX_PAGE_TEXTSIZE]; | |
635 char subtext[MAX_PAGE_TEXTSIZE]; | |
636 uint16_t tabPosition; | |
637 | |
638 *subtext = 0; | |
639 *text = 0; | |
640 tabPosition = 400; | |
641 | |
642 page = menu.pageMemoryForNavigation; | |
643 line = menu.lineMemoryForNavigationForPage[page]; | |
644 | |
645 switch(get_globalState()) | |
646 { | |
647 case StMOG: | |
648 tMOG_refresh(0, text, &tabPosition, subtext); | |
649 update_content_with_new_frame(page, text, tabPosition, subtext); | |
650 break; | |
651 case StMCG: | |
652 tMCG_refresh(0, text, &tabPosition, subtext); | |
653 update_content_with_new_frame(page, text, tabPosition, subtext); | |
654 break; | |
655 case StMSP: | |
656 tMSP_refresh(0, text, &tabPosition, subtext); | |
657 update_content_with_new_frame(page, text, tabPosition, subtext); | |
658 break; | |
659 case StMXTRA: | |
660 tMXtra_refresh(0, text, &tabPosition, subtext); | |
661 update_content_with_new_frame(page, text, tabPosition, subtext); | |
662 break; | |
663 case StMDECO: | |
664 if((line == 1) || (line == 3)) // dive mode or ppO2 limits (the later for correct MOD in gaslists) | |
665 { | |
666 tM_rebuild_pages(); | |
667 menu.lineMemoryForNavigationForPage[page] = line; // fix 160623 | |
668 GFX_SetFrameTop(menu.StartAddressForPage[page]); | |
669 } | |
670 else | |
671 { | |
672 tMDeco_refresh(line, text, &tabPosition, subtext); | |
673 clean_line_actual_page(); | |
674 update_content_actual_page(text, tabPosition, subtext); | |
675 } | |
676 break; | |
677 case StMDECOP: | |
678 tMDecoParameters_refresh(line, text, &tabPosition, subtext); | |
679 clean_line_actual_page(); | |
680 update_content_actual_page(text, tabPosition, subtext); | |
681 break; | |
682 case StMPLAN: | |
683 tMPlanner_refresh(line, text, &tabPosition, subtext); | |
684 clean_line_actual_page(); | |
685 update_content_actual_page(text, tabPosition, subtext); | |
686 break; | |
687 case StMHARD: | |
688 tMHardware_refresh(line, text, &tabPosition, subtext); | |
689 clean_line_actual_page(); | |
690 update_content_actual_page(text, tabPosition, subtext); | |
691 break; | |
692 case StMSYS: | |
693 if((line == 2) || (line == 3) || (line == 6)) | |
694 { | |
695 tM_rebuild_pages(); | |
696 menu.lineMemoryForNavigationForPage[page] = line; // fix 160623 | |
697 GFX_SetFrameTop(menu.StartAddressForPage[page]); | |
698 menu.lineMemoryForNavigationForPage[page] = line; | |
699 } | |
700 else | |
701 { | |
702 tMSystem_refresh(line, text, &tabPosition, subtext); | |
703 clean_line_actual_page(); | |
704 update_content_actual_page(text, tabPosition, subtext); | |
705 } | |
706 break; | |
507 | 707 case StMCustom: |
708 tMCustom_refresh(line, text, &tabPosition, subtext); | |
709 clean_line_actual_page(); | |
710 update_content_actual_page(text, tabPosition, subtext); | |
711 break; | |
38 | 712 default: |
713 break; | |
714 } | |
715 } | |
716 | |
717 void openMenu_first_page_with_OC_gas_update(void) | |
718 { | |
719 menu.pageMemoryForNavigation = 1; | |
720 for(int i=0;i<=MAXPAGES;i++) | |
721 menu.lineMemoryForNavigationForPage[i] = 0; | |
722 | |
723 set_globalState(StMOG); | |
724 updateMenu(); | |
725 openMenu(1); | |
726 } | |
727 | |
728 | |
729 void openMenu(uint8_t freshWithFlipPages) | |
730 { | |
731 uint8_t page, line; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
732 SSettings* pSettings; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
733 pSettings = settingsGetPointer(); |
38 | 734 |
735 findValidPosition(&page, &line); | |
736 if((page == 0) || (line == 0)) | |
737 return; | |
738 | |
739 menu.pageMemoryForNavigation = page; | |
740 /* new test for 3button design */ | |
741 if(freshWithFlipPages) | |
742 { | |
743 menu.lineMemoryForNavigationForPage[page] = 0; | |
744 menu.modeFlipPages = 1; | |
745 } | |
746 else | |
747 { | |
748 menu.lineMemoryForNavigationForPage[page] = line; | |
749 menu.modeFlipPages = 0; | |
750 } | |
751 | |
752 set_globalState_Menu_Page(page); | |
753 | |
754 | |
755 change_CLUT_entry(CLUT_MenuLineSelectedSides, (CLUT_MenuPageGasOC + page - 1)); | |
756 change_CLUT_entry(CLUT_MenuLineSelectedSeperator, (CLUT_MenuPageGasOC + page - 1)); | |
757 | |
758 | |
759 if(((page == 6) || (page == 8)) && (menu.pageCountNumber[page-1] == 0)) | |
760 { | |
761 change_CLUT_entry(CLUT_MenuLineSelectedSides, (CLUT_MenuPageGasOC + page - 2)); | |
762 change_CLUT_entry(CLUT_MenuLineSelectedSeperator, (CLUT_MenuPageGasOC + page - 2)); | |
763 | |
764 } | |
765 | |
766 GFX_SetFrameTop(menu.StartAddressForPage[page]); | |
767 /* new test for 3button design */ | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
768 |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
769 if(!pSettings->FlipDisplay) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
770 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
771 if(freshWithFlipPages) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
772 GFX_SetFrameBottom(tMdesignSolo.FBStartAdress, 0, 25, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
773 else |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
774 GFX_SetFrameBottom((tMdesignCursor.FBStartAdress) + 65*2*(line - 1), 0, 25, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
775 } |
38 | 776 else |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
777 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
778 if(freshWithFlipPages) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
779 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
780 GFX_SetFrameBottom((tMdesignSolo.FBStartAdress), 0, 480-390-KEY_LABEL_HIGH, 800, 390); //- (25 * 2 * 800), 0, 25, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
781 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
782 else |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
783 GFX_SetFrameBottom((tMdesignCursor.FBStartAdress + (390 - 65 *(line)) *2), 0,480-390-KEY_LABEL_HIGH, 800, 390); //480-390-KEY_LABEL_HIGH + 65*2*(line - 1) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
784 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
785 |
38 | 786 } |
787 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
788 static void block_diluent_handler(_Bool Unblock) |
38 | 789 { |
790 SStateList list; | |
791 static uint8_t linesAvailableForPageDiluent = 0; | |
792 get_idSpecificStateList(StMCG, &list); | |
793 | |
794 if(Unblock && linesAvailableForPageDiluent) | |
795 { | |
796 menu.linesAvailableForPage[list.page] = linesAvailableForPageDiluent; | |
797 } | |
798 else | |
799 { | |
800 linesAvailableForPageDiluent = menu.linesAvailableForPage[list.page]; | |
801 menu.linesAvailableForPage[list.page] = 0; | |
802 } | |
803 } | |
804 | |
805 void block_diluent_page(void) | |
806 { | |
807 block_diluent_handler(0); | |
808 } | |
809 | |
810 | |
811 void unblock_diluent_page(void) | |
812 { | |
813 block_diluent_handler(1); | |
814 } | |
815 | |
816 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
817 static void nextPage(void) |
38 | 818 { |
819 uint8_t page, line; | |
820 | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
821 SSettings* pSettings; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
822 pSettings = settingsGetPointer(); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
823 |
38 | 824 menu.pageMemoryForNavigation += 1; |
825 | |
826 findValidPosition(&page, &line); | |
827 menu.pageMemoryForNavigation = page; | |
828 /* new test for 3button design */ | |
829 //menu.lineMemoryForNavigationForPage[page] = line; | |
830 menu.lineMemoryForNavigationForPage[page] = 0; | |
831 menu.modeFlipPages = 1; | |
832 | |
833 set_globalState_Menu_Page(page); | |
834 | |
835 change_CLUT_entry(CLUT_MenuLineSelectedSides, (CLUT_MenuPageGasOC + page - 1)); | |
836 change_CLUT_entry(CLUT_MenuLineSelectedSeperator, (CLUT_MenuPageGasOC + page - 1)); | |
837 | |
838 GFX_SetFrameTop(menu.StartAddressForPage[page]); | |
839 /* new test for 3button design */ | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
840 //GFX_SetFrameBottom((.FBStartAdress) + 65*2*(line - 1), 0, 25, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
841 if(!pSettings->FlipDisplay) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
842 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
843 GFX_SetFrameBottom(tMdesignSolo.FBStartAdress, 0, 25, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
844 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
845 else |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
846 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
847 GFX_SetFrameBottom(tMdesignSolo.FBStartAdress, 0, 65, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
848 } |
38 | 849 } |
850 | |
851 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
852 static void nextLine(void) |
38 | 853 { |
854 uint8_t page, line; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
855 SSettings* pSettings; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
856 pSettings = settingsGetPointer(); |
38 | 857 |
858 page = menu.pageMemoryForNavigation; | |
859 menu.lineMemoryForNavigationForPage[page] += 1; | |
860 | |
861 findValidPosition(&page, &line); | |
862 menu.lineMemoryForNavigationForPage[page] = line; | |
863 | |
864 /* new test for 3button design */ | |
865 menu.modeFlipPages = 0; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
866 if(!pSettings->FlipDisplay) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
867 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
868 GFX_SetFrameBottom((tMdesignCursor.FBStartAdress) + 65*2*(line - 1), 0, 25, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
869 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
870 else |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
871 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
872 GFX_SetFrameBottom((tMdesignCursor.FBStartAdress)+ (390 - 65 *(line)) *2, 0, 480-390-KEY_LABEL_HIGH, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
873 } |
38 | 874 } |
875 | |
876 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
877 static void stepBackMenu(void) |
38 | 878 { |
879 if(menu.modeFlipPages == 0) | |
880 { | |
881 menu.lineMemoryForNavigationForPage[menu.pageMemoryForNavigation] = 0; | |
882 menu.modeFlipPages = 1; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
883 if(!settingsGetPointer()->FlipDisplay) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
884 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
885 GFX_SetFrameBottom(tMdesignSolo.FBStartAdress, 0, 25, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
886 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
887 else |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
888 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
889 GFX_SetFrameBottom(tMdesignSolo.FBStartAdress, 0, 480-390-KEY_LABEL_HIGH, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
890 } |
38 | 891 } |
892 else | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
893 { |
38 | 894 exitMenu(); |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
895 } |
38 | 896 } |
897 | |
898 | |
899 void exitMenu(void) | |
900 { | |
901 set_globalState_tHome(); | |
902 } | |
903 | |
904 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
905 static void stepForwardMenu(void) |
38 | 906 { |
907 if(menu.modeFlipPages == 1) | |
908 { | |
909 nextLine(); | |
910 } | |
911 else | |
912 gotoMenuEdit(); | |
913 } | |
914 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
915 static void gotoMenuEdit(void) |
38 | 916 { |
917 uint8_t line; | |
918 | |
919 line = menu.lineMemoryForNavigationForPage[menu.pageMemoryForNavigation]; | |
920 | |
921 switch(get_globalState()) | |
922 { | |
923 case StMOG: | |
924 openEdit_GasOC(line); | |
925 break; | |
926 case StMCG: | |
927 openEdit_GasCC(line); | |
928 break; | |
929 case StMSP: | |
930 openEdit_Setpoint(line); | |
931 break; | |
932 case StMXTRA: | |
933 openEdit_Xtra(line); | |
934 break; | |
935 case StMDECO: | |
936 openEdit_Deco(line); | |
937 break; | |
938 case StMDECOP: | |
939 openEdit_DecoParameter(line); | |
940 break; | |
941 case StMPLAN: | |
942 openEdit_Planner(line); | |
943 break; | |
944 case StMHARD: | |
945 openEdit_Hardware(line); | |
946 break; | |
947 case StMSYS: | |
948 openEdit_System(line); | |
949 break; | |
507 | 950 case StMCustom: |
951 openEdit_Custom(line); | |
952 break; | |
38 | 953 default: |
954 break; | |
955 } | |
956 } | |
957 | |
958 | |
959 void sendActionToMenu(uint8_t sendAction) | |
960 { | |
961 switch(sendAction) | |
962 { | |
963 case ACTION_BUTTON_ENTER: | |
964 stepForwardMenu(); | |
965 break; | |
966 case ACTION_BUTTON_NEXT: | |
967 if(menu.modeFlipPages) | |
968 nextPage(); | |
969 else | |
970 nextLine(); | |
971 break; | |
972 case ACTION_TIMEOUT: | |
973 case ACTION_MODE_CHANGE: | |
974 case ACTION_BUTTON_BACK: | |
975 /* new test for 3button design */ | |
976 stepBackMenu(); | |
977 break; | |
978 default: | |
979 break; | |
980 case ACTION_IDLE_TICK: | |
981 case ACTION_IDLE_SECOND: | |
982 break; | |
983 } | |
984 /* tMC_OC_Gas(StMOG1, pSettings); */ | |
985 } | |
986 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
987 static void tMenu_write(uint8_t page, char *text, char *subtext) |
38 | 988 { |
989 if(page > MAXPAGES) | |
990 return; | |
991 if(menu.linesAvailableForPage[page] == 0) | |
992 return; | |
993 | |
994 tMscreen.FBStartAdress = menu.StartAddressForPage[page]; | |
995 GFX_write_string(&FontT48, &tMwindow, text,1); | |
996 if((*subtext) && (menu.linesAvailableForPage[page] < 6)) | |
997 { | |
998 GFX_write_string(&FontT42, &tMwindow, subtext, (menu.linesAvailableForPage[page] + 1)); | |
999 } | |
1000 } | |
1001 | |
1002 | |
1003 /* Private functions ---------------------------------------------------------*/ | |
1004 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
1005 static void draw_tMdesignSubUnselected(uint32_t *ppDestination) |
38 | 1006 { |
1007 union al88_u | |
1008 { | |
1009 uint8_t al8[2]; | |
1010 uint16_t al88; | |
1011 }; | |
1012 | |
130
b7689d9e888a
Minor changes to improved code quality and to eliminate warnings
Ideenmodellierer
parents:
122
diff
changeset
|
1013 uint16_t* prunning = (uint16_t*)*ppDestination; |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1014 |
38 | 1015 union al88_u color_seperator; |
1016 union al88_u color_unselected; | |
1017 int i; | |
1018 | |
1019 color_seperator.al8[0] = CLUT_MenuLineUnselectedSeperator; | |
1020 color_unselected.al8[0] = CLUT_MenuLineUnselected; | |
1021 | |
1022 color_seperator.al8[1] = 0xFF; | |
1023 color_unselected.al8[1] = 0xFF; | |
1024 | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1025 *(__IO uint16_t*)prunning++ = color_seperator.al88; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1026 *(__IO uint16_t*)prunning++ = color_seperator.al88; |
38 | 1027 |
1028 for(i = 61; i > 0; i--) | |
1029 { | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1030 *(__IO uint16_t*)prunning++ = color_unselected.al88; |
38 | 1031 } |
1032 | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1033 *(__IO uint16_t*)prunning++ = color_seperator.al88; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1034 *(__IO uint16_t*)prunning++ = color_seperator.al88; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1035 |
130
b7689d9e888a
Minor changes to improved code quality and to eliminate warnings
Ideenmodellierer
parents:
122
diff
changeset
|
1036 *ppDestination = (uint32_t)prunning; |
38 | 1037 } |
1038 | |
1039 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
1040 static void draw_tMdesignSubSelected(uint32_t *ppDestination) |
38 | 1041 { |
1042 union al88_u | |
1043 { | |
1044 uint8_t al8[2]; | |
1045 uint16_t al88; | |
1046 }; | |
1047 | |
1048 union al88_u color_selected; | |
1049 union al88_u color_seperator; | |
1050 int i; | |
1051 | |
1052 color_selected.al8[0] = CLUT_MenuLineSelected; | |
1053 color_selected.al8[1] = 0xFF; | |
1054 | |
1055 color_seperator.al8[0] = CLUT_MenuLineSelectedSeperator; | |
1056 color_seperator.al8[1] = 0xFF; | |
1057 | |
1058 *(__IO uint16_t*)*ppDestination = color_seperator.al88; | |
1059 *ppDestination += 2; | |
1060 *(__IO uint16_t*)*ppDestination = color_seperator.al88; | |
1061 *ppDestination += 2; | |
1062 | |
1063 for(i = 61; i > 0; i--) | |
1064 { | |
1065 *(__IO uint16_t*)*ppDestination = color_selected.al88; | |
1066 *ppDestination += 2; | |
1067 } | |
1068 | |
1069 *(__IO uint16_t*)*ppDestination = color_seperator.al88; | |
1070 *ppDestination += 2; | |
1071 *(__IO uint16_t*)*ppDestination = color_seperator.al88; | |
1072 *ppDestination += 2; | |
1073 } | |
1074 | |
1075 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
1076 static void draw_tMdesignSubSelectedBorder(uint32_t *ppDestination) |
38 | 1077 { |
1078 union al88_u | |
1079 { | |
1080 uint8_t al8[2]; | |
1081 uint16_t al88; | |
1082 }; | |
1083 | |
1084 union al88_u color_selected_sides; | |
1085 | |
1086 int i; | |
1087 | |
1088 color_selected_sides.al8[0] = CLUT_MenuLineSelectedSides; | |
1089 color_selected_sides.al8[1] = 0xFF; | |
1090 | |
1091 for(i = 65; i > 0; i--) | |
1092 { | |
1093 *(__IO uint16_t*)*ppDestination = color_selected_sides.al88; | |
1094 *ppDestination += 2; | |
1095 } | |
1096 } | |
1097 | |
1098 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
1099 static void draw_tMcursorDesign(void) |
38 | 1100 { |
1101 int i,j; | |
1102 uint32_t pDestination; | |
1103 | |
1104 pDestination = tMdesignCursor.FBStartAdress; | |
1105 | |
1106 for(j = 801; j > 0; j--) | |
1107 { | |
1108 for(i = 5; i > 0; i--) | |
1109 { | |
1110 draw_tMdesignSubUnselected(&pDestination); | |
1111 } | |
1112 if((j > 787) || (j < 17)) | |
1113 draw_tMdesignSubSelectedBorder(&pDestination); | |
1114 else | |
1115 draw_tMdesignSubSelected(&pDestination); | |
1116 } | |
1117 | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1118 /* Draw menu background boxes which are visible if nothing is selected */ |
38 | 1119 pDestination = tMdesignSolo.FBStartAdress; |
1120 | |
1121 for(j = 801; j > 0; j--) | |
1122 { | |
1123 for(i = 6; i > 0; i--) | |
1124 { | |
1125 draw_tMdesignSubUnselected(&pDestination); | |
1126 } | |
1127 } | |
1128 } | |
1129 | |
1130 | |
167
5e41365ff0d8
cleanup: local data and functions can be static (tMenu)
Jan Mulder <jlmulder@xs4all.nl>
parents:
130
diff
changeset
|
1131 static void draw_tMheader(uint8_t page) |
38 | 1132 { |
1133 union al88_u | |
1134 { | |
1135 uint8_t al8[2]; | |
1136 uint16_t al88; | |
1137 }; | |
1138 union al88_u color_top; | |
1139 int i,j, k, k4text; | |
1140 uint32_t pBackup; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1141 uint16_t* pDestination; |
38 | 1142 uint8_t colorText; |
1143 uint16_t positionText; | |
1144 uint8_t pageText; | |
1145 | |
1146 const char text8max[MAXPAGES+1][8] = | |
1147 { "", | |
1148 "OC", | |
1149 "CC", | |
1150 "SP", | |
1151 "DATA", | |
1152 "DECO", | |
1153 "", | |
1154 "SYS", | |
1155 "", | |
507 | 1156 "", |
1157 "SIM" | |
38 | 1158 }; |
1159 | |
1160 const _Bool spacing[MAXPAGES+1] = | |
1161 { 0, | |
1162 0, // behind OC | |
1163 0, // behind CC | |
1164 1, // behind SP | |
1165 1, // behind DATA | |
1166 0, // behind DECO1 | |
1167 1, // behind DECO2 | |
1168 0, // behind SYS1 | |
507 | 1169 0, // behind SYS2 |
1170 1, // behind SYS3 | |
38 | 1171 1, // behind SIM |
1172 0 | |
1173 }; | |
1174 | |
1175 pBackup = tMscreen.FBStartAdress; | |
1176 tMscreen.FBStartAdress = menu.StartAddressForPage[page]; | |
130
b7689d9e888a
Minor changes to improved code quality and to eliminate warnings
Ideenmodellierer
parents:
122
diff
changeset
|
1177 pDestination = (uint16_t*) menu.StartAddressForPage[page]; |
38 | 1178 positionText = 10; |
1179 pageText = page; | |
1180 | |
1181 gfx_write_page_number(&tMscreen ,menu.pageCountNumber[page],menu.pageCountTotal,0); | |
1182 | |
1183 while((text8max[pageText][0] == 0) && (pageText > 1)) | |
1184 { | |
1185 pageText--; | |
1186 } | |
1187 | |
1188 for(k = 1; k <= MAXPAGES; k++) | |
1189 { | |
1190 if(menu.pageCountNumber[k] != 0) | |
1191 { | |
1192 k4text = k; // new hw 170522 | |
1193 if((text8max[k][0] == 0) && (menu.pageCountNumber[k-1] == 0)) | |
1194 k4text = k-1; | |
1195 | |
1196 color_top.al8[0] = CLUT_MenuPageGasOC + k - 1; | |
169
842f57bbaaad
Bugfix: highlight the menu underline correctly on selected state
Jan Mulder <jlmulder@xs4all.nl>
parents:
167
diff
changeset
|
1197 if (k == page) |
38 | 1198 { |
1199 color_top.al8[1] = 0xFF; | |
1200 } | |
1201 else | |
1202 { | |
1203 color_top.al8[1] = 0x50; | |
1204 } | |
1205 | |
1206 if(k4text == pageText) | |
1207 { | |
1208 colorText = CLUT_Font020; | |
1209 } | |
1210 else | |
1211 { | |
1212 colorText = CLUT_Font021; | |
1213 } | |
1214 | |
1215 write_content_simple(&tMscreen,positionText,775,0,&FontT42,text8max[k4text],colorText); | |
1216 /* | |
1217 write_content_simple(&tMscreen,positionText,775,0,&FontT42,text8max[k],colorText); | |
1218 if((text8max[k][0] == 0) && (menu.pageCountNumber[k-1] == 0)) | |
1219 write_content_simple(&tMscreen,positionText,775,0,&FontT42,text8max[k-1],colorText); | |
1220 */ | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1221 /* Draw color bars */ |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1222 if(!settingsGetPointer()->FlipDisplay) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1223 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1224 pDestination += 5 * 480; |
38 | 1225 |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1226 for(j = 60; j > 0; j--) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1227 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1228 pDestination += (390 + 26); |
38 | 1229 |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1230 for(i = 16; i > 0; i--) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1231 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1232 *(__IO uint16_t*)pDestination++ = color_top.al88; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1233 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1234 pDestination += 48; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1235 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1236 |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1237 pDestination += 5 * 480; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1238 positionText += 70; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1239 |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1240 if((k == 4) || ((k == 6) && (menu.pageCountNumber[5] == 0))) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1241 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1242 pDestination += 70 * 480; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1243 positionText += 70; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1244 } |
38 | 1245 |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1246 if(spacing[k]) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1247 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1248 pDestination += 35 * 480; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1249 positionText += 35; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1250 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1251 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1252 else |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1253 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1254 pDestination += (800 - 5)* 480; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1255 |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1256 for(j = 60; j > 0; j--) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1257 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1258 pDestination -= (390 + 26); |
38 | 1259 |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1260 for(i = 16; i > 0; i--) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1261 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1262 *(__IO uint16_t*)pDestination-- = color_top.al88; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1263 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1264 pDestination -= 48; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1265 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1266 |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1267 pDestination -= (800) * 480; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1268 positionText += 70; |
38 | 1269 |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1270 if((k == 4) || ((k == 6) && (menu.pageCountNumber[5] == 0))) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1271 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1272 pDestination -= 70 * 480; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1273 positionText += 70; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1274 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1275 |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1276 if(spacing[k]) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1277 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1278 pDestination -= 35 * 480; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1279 positionText += 35; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1280 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
51
diff
changeset
|
1281 } |
38 | 1282 } |
1283 } | |
1284 tMscreen.FBStartAdress = pBackup; | |
1285 } |