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