Mercurial > public > ostc4
annotate Discovery/Src/tMenuEditSystem.c @ 557:2702bfa7b177
Stabilityfix: Do not trust lastDiveLogID == 0 at startup:
If dive settings are reset for some reason also the lastDiveLogID is set to 0. Most likly the consostency check will find a valid entry. But this entry might not be the last one => return an error value to trigger the find function. Calling "find" at every startup is normal behavior if TRUST_LOG_CONSISTENCY is not set and was default for a long time => low risk
In addition a check of the header adresses has been added to identify a potential error while writing log samples
author | Ideenmodellierer |
---|---|
date | Thu, 12 Nov 2020 20:03:00 +0100 |
parents | a9c195be907e |
children | 66aef216828b |
rev | line source |
---|---|
38 | 1 /////////////////////////////////////////////////////////////////////////////// |
2 /// -*- coding: UTF-8 -*- | |
3 /// | |
4 /// \file Discovery/Src/tMenuEditSystem.c | |
5 /// \brief Main Template file for Menu Edit System settings | |
6 /// \author heinrichs weikamp gmbh | |
7 /// \date 05-Aug-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 "tMenuEditSystem.h" | |
31 | |
138 | 32 #include "data_exchange_main.h" |
38 | 33 #include "externLogbookFlash.h" |
34 #include "gfx_fonts.h" | |
35 #include "ostc.h" | |
36 #include "settings.h" // for getLicence() | |
37 #include "tHome.h" // for enum CUSTOMVIEWS and init_t7_compass() | |
343
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
38 #include "tMenu.h" |
38 | 39 #include "tMenuEdit.h" |
343
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
40 #include "tMenuSystem.h" |
520 | 41 #include "tMenuEditCustom.h" |
389
ebc2b571a0b9
Fix case for case sensitive OS
Jan Mulder <jan@jlmulder.nl>
parents:
384
diff
changeset
|
42 #include "motion.h" |
343
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
43 #include "t7.h" |
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
44 |
493
b560e474e319
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
468
diff
changeset
|
45 |
343
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
46 /*#define HAVE_DEBUG_VIEW */ |
379 | 47 static uint8_t infoPage = 0; |
38 | 48 |
49 /* Private function prototypes -----------------------------------------------*/ | |
50 void openEdit_DateTime(void); | |
51 void openEdit_Language(void); | |
52 void openEdit_Design(void); | |
53 void openEdit_Information(void); | |
54 void openEdit_Reset(void); | |
55 //void openEdit_ShowDebugInfo(void); | |
56 //void openEdit_Salinity(void); | |
57 | |
58 /* Announced function prototypes -----------------------------------------------*/ | |
59 uint8_t OnAction_Date (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
60 uint8_t OnAction_Time (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
61 uint8_t OnAction_DDMMYY (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
62 uint8_t OnAction_MMDDYY (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
63 uint8_t OnAction_YYMMDD (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
64 uint8_t OnAction_DST (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
65 uint8_t OnAction_English (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
66 uint8_t OnAction_German (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
67 uint8_t OnAction_French (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
68 uint8_t OnAction_Italian (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
69 uint8_t OnAction_Espanol (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
70 //uint8_t OnAction_Design_t7 (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
71 //uint8_t OnAction_Design_t7ft (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
72 //uint8_t OnAction_Design_t3 (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
73 | |
74 uint8_t OnAction_Units (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
75 uint8_t OnAction_Colorscheme (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
76 uint8_t OnAction_DebugInfo (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
77 | |
78 uint8_t OnAction_Exit (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
79 uint8_t OnAction_Confirm (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
80 uint8_t OnAction_RebootRTE (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
81 uint8_t OnAction_ResetDeco (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
82 uint8_t OnAction_ResetAll (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
83 uint8_t OnAction_ResetLogbook (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
84 uint8_t OnAction_RebootMainCPU (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
85 uint8_t OnAction_Nothing (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
86 uint8_t OnAction_LogbookOffset(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
87 uint8_t OnAction_SetFactoryDefaults(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
88 uint8_t OnAction_SetBatteryCharge(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
468
aa1d71875e25
Moved and deactivated analyse sample buffer switch:
ideenmodellierer
parents:
446
diff
changeset
|
89 #ifdef ENABLE_ANALYSE_SAMPLES |
424
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
90 uint8_t OnAction_RecoverSampleIdx(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
468
aa1d71875e25
Moved and deactivated analyse sample buffer switch:
ideenmodellierer
parents:
446
diff
changeset
|
91 #endif |
38 | 92 #ifdef SCREENTEST |
93 uint8_t OnAction_ScreenTest (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
94 #endif | |
95 uint8_t OnAction_Information (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
96 /* | |
97 uint8_t OnAction_Salinity (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
98 uint8_t OnAction_TestCLog (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
99 */ | |
100 | |
101 /* Exported functions --------------------------------------------------------*/ | |
102 | |
103 void openEdit_System(uint8_t line) | |
104 { | |
105 set_globalState_Menu_Line(line); | |
106 resetMenuEdit(CLUT_MenuPageSystem); | |
107 | |
108 if(actual_menu_content == MENU_SURFACE) | |
109 { | |
110 switch(line) | |
111 { | |
112 case 1: | |
113 default: | |
114 openEdit_DateTime(); | |
115 break; | |
116 case 2: | |
117 openEdit_Language(); | |
118 break; | |
119 case 3: | |
120 openEdit_Design(); | |
121 break; | |
122 case 4: | |
520 | 123 openEdit_Information(); |
38 | 124 break; |
125 case 5: | |
126 openEdit_Reset(); | |
127 break; | |
128 /* | |
129 case 3: | |
130 openEdit_DecoFutureTTS(); | |
131 break; | |
132 case 4: | |
133 openEdit_DecoLastStop(); | |
134 break; | |
135 */ | |
136 } | |
137 } | |
138 else | |
139 { | |
520 | 140 openEdit_CustomviewDivemodeMenu(line); |
38 | 141 } |
142 | |
143 } | |
144 | |
145 /* Private functions ---------------------------------------------------------*/ | |
146 | |
147 | |
148 void openEdit_DateTime(void) | |
149 { | |
150 RTC_DateTypeDef Sdate; | |
151 RTC_TimeTypeDef Stime; | |
152 uint8_t day,month,year,hour,minute, dateFormat, ddmmyy, mmddyy, yymmdd; | |
153 char text[32]; | |
154 SSettings *pSettings; | |
155 const SDiveState * pStateReal = stateRealGetPointer(); | |
156 | |
157 pSettings = settingsGetPointer(); | |
158 translateDate(pStateReal->lifeData.dateBinaryFormat, &Sdate); | |
159 translateTime(pStateReal->lifeData.timeBinaryFormat, &Stime); | |
160 year = Sdate.Year; | |
161 month = Sdate.Month; | |
162 day = Sdate.Date; | |
163 hour = Stime.Hours; | |
164 minute= Stime.Minutes; | |
165 | |
166 if(year < 16) | |
167 year = 16; | |
168 | |
169 if(month < 1) | |
170 month = 1; | |
171 | |
172 if(day < 1) | |
173 day = 1; | |
174 | |
175 // daylightsaving = Stime.DayLightSaving; | |
176 dateFormat = pSettings->date_format; | |
177 ddmmyy = 0; | |
178 mmddyy = 0; | |
179 yymmdd = 0; | |
180 | |
181 if(dateFormat == DDMMYY) | |
182 ddmmyy = 1; | |
183 else | |
184 if(dateFormat == MMDDYY) | |
185 mmddyy = 1; | |
186 else | |
187 yymmdd = 1; | |
188 | |
189 text[0] = '\001'; | |
190 text[1] = TXT_DateAndTime; | |
191 text[2] = 0; | |
192 | |
193 write_topline(text); | |
194 | |
195 write_label_fix( 20, 340, ME_Y_LINE1, &FontT42, TXT_TimeConfig); | |
196 write_label_fix( 20, 340, ME_Y_LINE2, &FontT42, TXT_DateConfig); | |
197 write_label_var( 600, 800, ME_Y_LINE2, &FontT48, "\016\016DDMMYY\017"); | |
198 write_label_fix( 20, 790, ME_Y_LINE3, &FontT42, TXT_Format); | |
199 // write_label_fix( 350 ,580, 250, &FontT42, TXT_Daylightsaving); | |
200 | |
201 write_field_2digit(StMSYS1_Time, 320, 780, ME_Y_LINE1, &FontT48, "##:##", (uint32_t)hour, (uint32_t)minute, 0, 0); | |
202 write_field_2digit(StMSYS1_Date, 320, 780, ME_Y_LINE2, &FontT48, "##-##-20##", (uint32_t)day, (uint32_t)month, (uint32_t)year, 0); | |
203 write_field_on_off(StMSYS1_DDMMYY, 320, 790, ME_Y_LINE3, &FontT48, "DDMMYY", ddmmyy); | |
204 write_field_on_off(StMSYS1_MMDDYY, 320, 790, ME_Y_LINE4, &FontT48, "MMDDYY", mmddyy); | |
205 write_field_on_off(StMSYS1_YYMMDD, 320, 790, ME_Y_LINE5, &FontT48, "YYMMDD", yymmdd); | |
206 // write_field_on_off(StMSYS1_DST, 350, 580, 310, &FontT48, "Active", daylightsaving); | |
207 | |
208 setEvent(StMSYS1_Date, (uint32_t)OnAction_Date); | |
209 setEvent(StMSYS1_Time, (uint32_t)OnAction_Time); | |
210 setEvent(StMSYS1_DDMMYY, (uint32_t)OnAction_DDMMYY); | |
211 setEvent(StMSYS1_MMDDYY, (uint32_t)OnAction_MMDDYY); | |
212 setEvent(StMSYS1_YYMMDD, (uint32_t)OnAction_YYMMDD); | |
213 // setEvent(StMSYS1_DST, (uint32_t)OnAction_DST); | |
214 | |
215 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); | |
216 } | |
217 | |
218 | |
219 uint8_t OnAction_Date(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
220 { | |
221 uint8_t digitContentNew; | |
222 uint32_t newDay, newMonth, newYear; | |
223 RTC_DateTypeDef sdatestructure; | |
224 | |
225 | |
226 if(action == ACTION_BUTTON_ENTER) | |
227 { | |
228 return digitContent; | |
229 } | |
230 if(action == ACTION_BUTTON_ENTER_FINAL) | |
231 { | |
232 evaluateNewString(editId, &newDay, &newMonth, &newYear, 0); | |
233 if(newDay == 0) | |
234 newDay = 1; | |
235 if(newDay > 31) | |
236 newDay = 31; | |
237 if(newMonth == 0) | |
238 newMonth = 1; | |
239 if(newMonth > 12) | |
240 newMonth = 12; | |
241 if((newMonth == 2) && (newDay > 29)) | |
242 newDay = 29; | |
243 if((newDay > 30) && ((newMonth == 4) ||(newMonth == 6) ||(newMonth == 9) ||(newMonth == 11))) | |
244 newDay = 30; | |
245 if(newYear < 17) | |
246 newYear = 17; | |
247 if(newYear > 99) | |
248 newYear = 99; | |
249 | |
250 sdatestructure.Date = newDay; | |
251 sdatestructure.Month = newMonth; | |
252 sdatestructure.Year = newYear; | |
253 setWeekday(&sdatestructure); | |
254 | |
255 setDate(sdatestructure); | |
256 | |
257 tMenuEdit_newInput(editId, newDay, newMonth, newYear, 0); | |
258 return UNSPECIFIC_RETURN; | |
259 } | |
260 if(action == ACTION_BUTTON_NEXT) | |
261 { | |
262 digitContentNew = digitContent + 1; | |
263 if((blockNumber == 0) && (digitContentNew > '0' + 31)) | |
264 digitContentNew = '1'; | |
265 if((blockNumber == 1) && (digitContentNew > '0' + 12)) | |
266 digitContentNew = '1'; | |
267 // year range 2017-2018 | |
55
a7683f9765da
Italian activated (needs some fine tuning), special characters (?,?,?,?,? and others) currently not working...
heinrichsweikamp
parents:
38
diff
changeset
|
268 if((blockNumber == 2) && (digitContentNew > '0' + 22)) |
a7683f9765da
Italian activated (needs some fine tuning), special characters (?,?,?,?,? and others) currently not working...
heinrichsweikamp
parents:
38
diff
changeset
|
269 digitContentNew = '0' + 18; |
38 | 270 return digitContentNew; |
271 } | |
272 if(action == ACTION_BUTTON_BACK) | |
273 { | |
274 digitContentNew = digitContent - 1; | |
275 if((blockNumber == 0) && (digitContentNew < '1')) | |
276 digitContentNew = '0' + 31; | |
277 if((blockNumber == 1) && (digitContentNew < '1')) | |
278 digitContentNew = '0' + 12; | |
279 // year range 2016-2018 | |
280 if((blockNumber == 2) && (digitContentNew < '0' + 17)) | |
281 digitContentNew = '0' + 18; | |
282 return digitContentNew; | |
283 } | |
284 /* | |
285 if(action == ACTION_BUTTON_NEXT) | |
286 { | |
287 digitContentNew = digitContent + 1; | |
288 if((blockNumber == 2) && (digitNumber == 0) && (digitContentNew > '2')) | |
289 digitContentNew = '1'; | |
290 if((blockNumber == 0) && (digitNumber == 0) && (digitContentNew > '3')) | |
291 digitContentNew = '0'; | |
292 if((blockNumber == 1) && (digitNumber == 0) && (digitContentNew > '1')) | |
293 digitContentNew = '0'; | |
294 if(digitContentNew > '9') | |
295 digitContentNew = '0'; | |
296 return digitContentNew; | |
297 } | |
298 if(action == ACTION_BUTTON_BACK) | |
299 { | |
300 digitContentNew = digitContent - 1; | |
301 if((blockNumber == 2) && (digitNumber == 0) && (digitContentNew < '1')) | |
302 digitContentNew = '2'; | |
303 if((blockNumber == 0) && (digitNumber == 0) && (digitContentNew < '0')) | |
304 digitContentNew = '3'; | |
305 if((blockNumber == 1) && (digitNumber == 0) && (digitContentNew < '0')) | |
306 digitContentNew = '1'; | |
307 if(digitContentNew < '0') | |
308 digitContentNew = '9'; | |
309 return digitContentNew; | |
310 } | |
311 */ | |
312 return UNSPECIFIC_RETURN; | |
313 } | |
314 | |
315 | |
316 uint8_t OnAction_Time(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
317 { | |
318 uint8_t digitContentNew; | |
319 uint32_t newHour, newMinute; | |
320 RTC_TimeTypeDef stimestructure; | |
321 | |
322 if(action == ACTION_BUTTON_ENTER) | |
323 { | |
324 return digitContent; | |
325 } | |
326 if(action == ACTION_BUTTON_ENTER_FINAL) | |
327 { | |
328 evaluateNewString(editId, &newHour, &newMinute, 0, 0); | |
329 if(newHour > 23) | |
330 newHour = 23; | |
331 if(newMinute > 59) | |
332 newMinute = 59; | |
333 | |
334 stimestructure.Hours = newHour; | |
335 stimestructure.Minutes = newMinute; | |
336 stimestructure.Seconds = 0; | |
337 | |
338 setTime(stimestructure); | |
339 | |
340 tMenuEdit_newInput(editId, newHour, newMinute, 0, 0); | |
341 return UNSPECIFIC_RETURN; | |
342 } | |
343 if(action == ACTION_BUTTON_NEXT) | |
344 { | |
345 digitContentNew = digitContent + 1; | |
346 if((blockNumber == 0) && (digitContentNew > '0' + 23)) | |
347 digitContentNew = '0'; | |
348 if((blockNumber == 1) && (digitContentNew > '0' + 59)) | |
349 digitContentNew = '0'; | |
350 return digitContentNew; | |
351 } | |
352 if(action == ACTION_BUTTON_BACK) | |
353 { | |
354 digitContentNew = digitContent - 1; | |
355 if((blockNumber == 0) && (digitContentNew < '0')) | |
356 digitContentNew = '0' + 23; | |
357 if((blockNumber == 1) && (digitContentNew < '0')) | |
358 digitContentNew = '0' + 59; | |
359 return digitContentNew; | |
360 } | |
361 /* | |
362 if(action == ACTION_BUTTON_NEXT) | |
363 { | |
364 digitContentNew = digitContent + 1; | |
365 if((blockNumber == 0) && (digitNumber == 0) && (digitContentNew > '2')) | |
366 digitContentNew = '0'; | |
367 if((blockNumber == 1) && (digitNumber == 0) && (digitContentNew > '5')) | |
368 digitContentNew = '0'; | |
369 if(digitContentNew > '9') | |
370 digitContentNew = '0'; | |
371 return digitContentNew; | |
372 } | |
373 if(action == ACTION_BUTTON_BACK) | |
374 { | |
375 digitContentNew = digitContent - 1; | |
376 if((blockNumber == 0) && (digitNumber == 0) && (digitContentNew < '0')) | |
377 digitContentNew = '2'; | |
378 if((blockNumber == 1) && (digitNumber == 0) && (digitContentNew < '0')) | |
379 digitContentNew = '5'; | |
380 if(digitContentNew < '0') | |
381 digitContentNew = '9'; | |
382 return digitContentNew; | |
383 } | |
384 */ | |
385 return UNSPECIFIC_RETURN; | |
386 } | |
387 | |
388 | |
389 uint8_t OnAction_DDMMYY(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
390 { | |
391 SSettings *pSettings; | |
392 | |
393 pSettings = settingsGetPointer(); | |
394 pSettings->date_format = DDMMYY; | |
395 | |
396 tMenuEdit_set_on_off(editId, 1); | |
397 tMenuEdit_set_on_off(StMSYS1_MMDDYY, 0); | |
398 tMenuEdit_set_on_off(StMSYS1_YYMMDD, 0); | |
399 | |
400 return UNSPECIFIC_RETURN; | |
401 } | |
402 | |
403 | |
404 uint8_t OnAction_MMDDYY(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
405 { | |
406 SSettings *pSettings; | |
407 | |
408 pSettings = settingsGetPointer(); | |
409 pSettings->date_format = MMDDYY; | |
410 | |
411 tMenuEdit_set_on_off(editId, 1); | |
412 tMenuEdit_set_on_off(StMSYS1_DDMMYY, 0); | |
413 tMenuEdit_set_on_off(StMSYS1_YYMMDD, 0); | |
414 | |
415 return UNSPECIFIC_RETURN; | |
416 } | |
417 | |
418 | |
419 uint8_t OnAction_YYMMDD(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
420 { | |
421 SSettings *pSettings; | |
422 | |
423 pSettings = settingsGetPointer(); | |
424 pSettings->date_format = YYMMDD; | |
425 | |
426 tMenuEdit_set_on_off(editId, 1); | |
427 tMenuEdit_set_on_off(StMSYS1_MMDDYY, 0); | |
428 tMenuEdit_set_on_off(StMSYS1_DDMMYY, 0); | |
429 | |
430 return UNSPECIFIC_RETURN; | |
431 } | |
432 | |
433 | |
434 uint8_t OnAction_DST(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
435 { | |
436 RTC_TimeTypeDef stimestructure; | |
437 uint8_t newDST; | |
438 | |
439 get_RTC_DateTime(0, &stimestructure); | |
440 newDST = stimestructure.DayLightSaving; | |
441 if(newDST) | |
442 newDST = 0; | |
443 else | |
444 newDST = 1; | |
445 stimestructure.DayLightSaving = newDST; | |
446 set_RTC_DateTime(0, &stimestructure); | |
447 | |
448 tMenuEdit_set_on_off(editId, newDST); | |
449 | |
450 return UNSPECIFIC_RETURN; | |
451 } | |
452 | |
453 | |
454 void openEdit_Language(void) | |
455 { | |
456 char text[32]; | |
457 uint8_t actualLanguage, active; | |
458 SSettings *pSettings; | |
459 | |
460 pSettings = settingsGetPointer(); | |
461 actualLanguage = pSettings->selected_language; | |
462 | |
463 text[0] = '\001'; | |
464 text[1] = TXT_Language; | |
465 text[2] = 0; | |
466 write_topline(text); | |
467 | |
468 text[0] = TXT_LanguageName; | |
469 text[1] = 0; | |
470 | |
471 pSettings->selected_language = LANGUAGE_English; | |
472 if( actualLanguage == pSettings->selected_language) | |
473 active = 1; | |
474 else | |
475 active = 0; | |
476 write_field_on_off(StMSYS2_English, 30, 500, ME_Y_LINE1, &FontT48, text, active); | |
477 | |
478 pSettings->selected_language = LANGUAGE_German; | |
479 if( actualLanguage == pSettings->selected_language) | |
480 active = 1; | |
481 else | |
482 active = 0; | |
483 write_field_on_off(StMSYS2_German, 30, 800, ME_Y_LINE2, &FontT48, text, active); | |
484 | |
485 pSettings->selected_language = LANGUAGE_French; | |
486 if( actualLanguage == pSettings->selected_language) | |
487 active = 1; | |
488 else | |
489 active = 0; | |
490 write_field_on_off(StMSYS2_French, 30, 800, ME_Y_LINE3, &FontT48, text, active); | |
55
a7683f9765da
Italian activated (needs some fine tuning), special characters (?,?,?,?,? and others) currently not working...
heinrichsweikamp
parents:
38
diff
changeset
|
491 |
38 | 492 |
493 pSettings->selected_language = LANGUAGE_Italian; | |
494 if( actualLanguage == pSettings->selected_language) | |
495 active = 1; | |
496 else | |
497 active = 0; | |
498 write_field_on_off(StMSYS2_Italian, 30, 800, ME_Y_LINE4, &FontT48, text, active); | |
499 | |
102
4276d56eb37c
hPa instead of mbar, enabled Spanish language
heinrichsweikamp
parents:
64
diff
changeset
|
500 |
38 | 501 pSettings->selected_language = LANGUAGE_Espanol; |
502 if( actualLanguage == pSettings->selected_language) | |
503 active = 1; | |
504 else | |
505 active = 0; | |
506 write_field_on_off(StMSYS2_Espanol, 30, 800, ME_Y_LINE5, &FontT48, text, active); | |
102
4276d56eb37c
hPa instead of mbar, enabled Spanish language
heinrichsweikamp
parents:
64
diff
changeset
|
507 |
38 | 508 pSettings->selected_language = actualLanguage; |
509 | |
510 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); | |
511 | |
512 setEvent(StMSYS2_English, (uint32_t)OnAction_English); | |
513 setEvent(StMSYS2_German, (uint32_t)OnAction_German); | |
514 setEvent(StMSYS2_French, (uint32_t)OnAction_French); | |
55
a7683f9765da
Italian activated (needs some fine tuning), special characters (?,?,?,?,? and others) currently not working...
heinrichsweikamp
parents:
38
diff
changeset
|
515 setEvent(StMSYS2_Italian, (uint32_t)OnAction_Italian); |
102
4276d56eb37c
hPa instead of mbar, enabled Spanish language
heinrichsweikamp
parents:
64
diff
changeset
|
516 setEvent(StMSYS2_Espanol, (uint32_t)OnAction_Espanol); |
38 | 517 } |
518 | |
519 | |
520 uint8_t OnAction_English (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
521 { | |
522 SSettings *pSettings = settingsGetPointer(); | |
523 pSettings->selected_language = LANGUAGE_English; | |
524 return EXIT_TO_MENU_WITH_LOGO; | |
525 } | |
526 | |
527 | |
528 uint8_t OnAction_German (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
529 { | |
530 SSettings *pSettings = settingsGetPointer(); | |
531 pSettings->selected_language = LANGUAGE_German; | |
532 return EXIT_TO_MENU_WITH_LOGO; | |
533 } | |
534 | |
535 | |
536 uint8_t OnAction_French (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
537 { | |
538 SSettings *pSettings = settingsGetPointer(); | |
539 pSettings->selected_language = LANGUAGE_French; | |
540 return EXIT_TO_MENU_WITH_LOGO; | |
541 } | |
542 | |
543 | |
544 uint8_t OnAction_Italian (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
545 { | |
546 SSettings *pSettings = settingsGetPointer(); | |
547 pSettings->selected_language = LANGUAGE_Italian; | |
548 return EXIT_TO_MENU_WITH_LOGO; | |
549 } | |
550 | |
551 | |
552 uint8_t OnAction_Espanol (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
553 { | |
554 SSettings *pSettings = settingsGetPointer(); | |
555 pSettings->selected_language = LANGUAGE_Espanol; | |
556 return EXIT_TO_MENU_WITH_LOGO; | |
557 } | |
558 | |
559 | |
560 void openEdit_Design(void) | |
561 { | |
562 refresh_Design(); | |
563 | |
564 write_field_button(StMSYS3_Units, 400, 700, ME_Y_LINE1, &FontT48, ""); | |
565 write_field_button(StMSYS3_Colors, 400, 700, ME_Y_LINE2, &FontT48, ""); | |
343
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
566 #ifdef HAVE_DEBUG_VIEW |
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
567 write_field_button(StMSYS3_Debug, 400, 700, ME_Y_LINE3, &FontT48, ""); |
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
568 #endif |
38 | 569 setEvent(StMSYS3_Units, (uint32_t)OnAction_Units); |
570 setEvent(StMSYS3_Colors, (uint32_t)OnAction_Colorscheme); | |
343
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
571 #ifdef HAVE_DEBUG_VIEW |
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
572 setEvent(StMSYS3_Debug, (uint32_t)OnAction_DebugInfo); |
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
573 #endif |
38 | 574 } |
575 | |
576 | |
577 void refresh_Design(void) | |
578 { | |
579 char text[32]; | |
580 | |
581 // header | |
582 text[0] = '\001'; | |
583 text[1] = TXT_2BYTE; | |
584 text[2] = TXT2BYTE_Layout; | |
585 text[3] = 0; | |
586 write_topline(text); | |
587 | |
588 // units | |
589 text[0] = TXT_2BYTE; | |
590 text[1] = TXT2BYTE_Units; | |
591 text[2] = 0; | |
592 write_label_var( 30, 200, ME_Y_LINE1, &FontT48, text); | |
593 | |
594 if(settingsGetPointer()->nonMetricalSystem) | |
595 { | |
596 text[1] = TXT2BYTE_Units_feet; | |
597 } | |
598 else | |
599 { | |
600 text[1] = TXT2BYTE_Units_metric; | |
601 } | |
602 write_label_var( 400, 700, ME_Y_LINE1, &FontT48, text); | |
603 | |
604 // colorscheme | |
605 text[0] = TXT_2BYTE; | |
606 text[1] = TXT2BYTE_Farbschema; | |
607 text[2] = 0; | |
118
ee7f2cd9b9b4
Enlarge text limits to get string displayed completly
Ideenmodellierer
parents:
103
diff
changeset
|
608 write_label_var( 30, 300, ME_Y_LINE2, &FontT48, text); |
38 | 609 |
610 text[0] = '0' + settingsGetPointer()->tX_colorscheme; | |
611 text[1] = 0; | |
612 write_label_var( 400, 700, ME_Y_LINE2, &FontT48, text); | |
613 | |
343
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
614 #ifdef HAVE_DEBUG_VIEW |
38 | 615 // specials |
616 text[0] = TXT_2BYTE; | |
617 text[1] = TXT2BYTE_ShowDebug; | |
618 text[2] = 0; | |
619 write_label_var( 30, 700, ME_Y_LINE3, &FontT48, text); | |
620 | |
621 if(settingsGetPointer()->showDebugInfo) | |
622 text[0] = '\005'; | |
623 else | |
624 text[0] = '\006'; | |
625 text[1] = 0; | |
626 write_label_var( 400, 700, ME_Y_LINE3, &FontT48, text); | |
343
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
627 #endif |
38 | 628 |
629 // design | |
630 text[0] = TXT_Depth; | |
631 text[1] = 0; | |
632 write_content( 30, 700, ME_Y_LINE4, &FontT24, text, CLUT_Font031); | |
633 write_content( 30, 700, ME_Y_LINE4 + 30 + 70, &FontT48, "___________", CLUT_DIVE_FieldSeperatorLines); | |
634 write_content(280, 700, ME_Y_LINE4 + 30 + 70 - 3, &FontT48, "|", CLUT_DIVE_pluginbox); | |
635 write_content(290, 700, ME_Y_LINE4 + 30 + 70 - 37, &FontT48, "_______________", CLUT_DIVE_pluginbox); | |
636 write_content( 30, 700, ME_Y_LINE4 + 30, &FontT144, "24.7", CLUT_Font027); | |
637 | |
638 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); | |
639 } | |
640 | |
641 | |
642 uint8_t OnAction_Units(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
643 { | |
644 settingsGetPointer()->nonMetricalSystem = !(settingsGetPointer()->nonMetricalSystem); | |
645 return EXIT_TO_MENU_WITH_LOGO;//UPDATE_DIVESETTINGS; | |
646 } | |
647 | |
648 | |
649 uint8_t OnAction_Colorscheme(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
650 { | |
651 uint8_t newColorscheme; | |
652 | |
653 newColorscheme = settingsGetPointer()->tX_colorscheme + 1; | |
654 | |
655 if(newColorscheme > 3) | |
656 newColorscheme = 0; | |
657 | |
658 settingsGetPointer()->tX_colorscheme = newColorscheme; | |
659 GFX_use_colorscheme(newColorscheme); | |
660 tHome_init_compass(); | |
661 return UNSPECIFIC_RETURN; | |
662 } | |
663 | |
664 | |
665 uint8_t OnAction_DebugInfo(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
666 { | |
667 settingsGetPointer()->showDebugInfo = !(settingsGetPointer()->showDebugInfo); | |
668 return UPDATE_DIVESETTINGS; | |
669 } | |
670 | |
671 | |
672 | |
673 | |
674 /* | |
675 uint8_t OnAction_Design_t7ft (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
676 { | |
677 SSettings *pSettings = settingsGetPointer(); | |
678 if((pSettings->design == 7) && pSettings->nonMetricalSystem) | |
679 return EXIT_TO_MENU; | |
680 pSettings->design = 7; | |
681 pSettings->nonMetricalSystem = 1; | |
682 tMenuEdit_set_on_off(StMSYS3_t7, 0); | |
683 tMenuEdit_set_on_off(StMSYS3_t7ft, 1); | |
684 tMenuEdit_set_on_off(StMSYS3_t3, 0); | |
685 return UPDATE_DIVESETTINGS; | |
686 } | |
687 | |
688 | |
689 uint8_t OnAction_Design_t7 (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
690 { | |
691 SSettings *pSettings = settingsGetPointer(); | |
692 if((pSettings->design == 7) && (pSettings->nonMetricalSystem == 0)) | |
693 return EXIT_TO_MENU; | |
694 pSettings->design = 7; | |
695 pSettings->nonMetricalSystem = 0; | |
696 tMenuEdit_set_on_off(StMSYS3_t7, 1); | |
697 tMenuEdit_set_on_off(StMSYS3_t7ft, 0); | |
698 tMenuEdit_set_on_off(StMSYS3_t3, 0); | |
699 return UPDATE_DIVESETTINGS; | |
700 } | |
701 | |
702 | |
703 uint8_t OnAction_Design_t3 (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
704 { | |
705 SSettings *pSettings = settingsGetPointer(); | |
706 if(pSettings->design == 3) | |
707 return EXIT_TO_MENU; | |
708 pSettings->design = 3; | |
709 pSettings->nonMetricalSystem = 0; | |
710 tMenuEdit_set_on_off(StMSYS3_t7, 0); | |
711 tMenuEdit_set_on_off(StMSYS3_t7ft,0); | |
712 tMenuEdit_set_on_off(StMSYS3_t3, 1); | |
713 return UPDATE_DIVESETTINGS; | |
714 } | |
715 */ | |
716 | |
717 | |
368
50ea68c7a153
Added menu item for motion detection. There are several possibility to use motion detection for user action input. To select of the a new menu entry has been added to the Sys2 =>Custom View Menu (Variables in german)
ideenmodellierer
parents:
259
diff
changeset
|
718 |
38 | 719 void openEdit_Information(void) |
720 { | |
721 char text[70]; | |
722 | |
723 infoPage = 0; | |
724 | |
725 text[0] = '\001'; | |
726 text[1] = TXT_Information; | |
727 text[2] = 0; | |
728 write_topline(text); | |
729 | |
730 text[0] = TXT_2BYTE; | |
731 text[1] = TXT2BYTE_ButtonNext; | |
732 text[2] = 0; | |
733 | |
520 | 734 write_field_button(StMSYS4_Info, 30, 800, ME_Y_LINE6, &FontT48, text); |
38 | 735 |
520 | 736 setEvent(StMSYS4_Info, (uint32_t)OnAction_Information); |
38 | 737 } |
738 | |
739 | |
740 uint8_t OnAction_Information (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
741 { | |
742 resetEnterPressedToStateBeforeButtonAction(); | |
743 | |
744 infoPage++; | |
745 if(infoPage > 3) | |
746 return EXIT_TO_MENU; | |
747 else | |
748 return UNSPECIFIC_RETURN; | |
749 } | |
750 | |
751 | |
752 void refresh_InformationPage(void) | |
753 { | |
754 char text_header[5]; | |
755 char text_button[5]; | |
756 char text_content[256]; | |
757 uint8_t date[3], year,month,day; | |
758 | |
759 RTC_DateTypeDef Sdate, Sdate2; | |
760 float temperature1, temperature2, voltage, offsetTemperature; | |
761 | |
762 //RTC_TimeTypeDef Stime; | |
763 | |
764 /* | |
765 SDeviceLine batteryChargeCycles; | |
766 SDeviceLine batteryChargeCompleteCycles; | |
767 SDeviceLine temperatureMinimum; | |
768 SDeviceLine temperatureMaximum; | |
769 SDeviceLine depthMaximum; | |
770 SDeviceLine diveCycles; | |
771 SDeviceLine voltageMinimum; | |
772 */ | |
773 | |
774 switch(infoPage) | |
775 { | |
776 case 0: | |
777 text_header[0] = '\001'; | |
778 text_header[1] = TXT_Information; | |
779 text_header[2] = 0; | |
780 | |
781 write_label_var( 20, 800, ME_Y_LINE1, &FontT42, "Dive Computer OSTC4"); | |
782 write_label_var( 20, 800, ME_Y_LINE2, &FontT42, "Design heinrichs/weikamp"); | |
783 | |
784 Sdate.Year = firmwareDataGetPointer()->release_year; | |
785 Sdate.Month = firmwareDataGetPointer()->release_month; | |
786 Sdate.Date = firmwareDataGetPointer()->release_day; | |
787 | |
788 if(settingsGetPointer()->date_format == DDMMYY) | |
789 { | |
790 day = 0; | |
791 month = 1; | |
792 year = 2; | |
793 } | |
794 else | |
795 if(settingsGetPointer()->date_format == MMDDYY) | |
796 { | |
797 day = 1; | |
798 month = 0; | |
799 year = 2; | |
800 } | |
801 else | |
802 { | |
803 day = 2; | |
804 month = 1; | |
805 year = 0; | |
806 } | |
807 date[day] = Sdate.Date; | |
808 date[month] = Sdate.Month; | |
809 date[year] = Sdate.Year; | |
810 snprintf(text_content,40,"Firmware release date: %02d.%02d.%02d",date[0],date[1],date[2]); | |
811 write_label_var( 20, 800, ME_Y_LINE3, &FontT42, text_content); | |
812 write_label_var( 20, 800, ME_Y_LINE4, &FontT42, "for more information"); | |
64 | 813 write_label_var( 20, 800, ME_Y_LINE5, &FontT42, "info@heinrichsweikamp.com"); |
38 | 814 |
815 text_button[0] = TXT_2BYTE; | |
816 text_button[1] = TXT2BYTE_ButtonNext; | |
817 text_button[2] = 0; | |
818 break; | |
819 | |
820 case 1: | |
821 text_header[0] = '\001'; | |
822 text_header[1] = TXT_2BYTE; | |
823 text_header[2] = TXT2BYTE_Usage_Battery; | |
824 text_header[3] = 0; | |
825 | |
826 text_content[0] = TXT_2BYTE; | |
827 text_content[1] = TXT2BYTE_ChargeCycles; | |
828 text_content[2] = 0; | |
829 write_label_var( 20, 800, ME_Y_LINE1, &FontT42, text_content); | |
57 | 830 snprintf(text_content,80,"%ld (%ld)",stateDeviceGetPointer()->batteryChargeCycles.value_int32,stateDeviceGetPointer()->batteryChargeCompleteCycles.value_int32); |
38 | 831 write_label_var( 20, 800, ME_Y_LINE2, &FontT42, text_content); |
832 | |
833 translateDate(stateDeviceGetPointer()->batteryChargeCycles.date_rtc_dr, &Sdate); | |
834 translateDate(stateDeviceGetPointer()->batteryChargeCompleteCycles.date_rtc_dr, &Sdate2); | |
835 snprintf(text_content,80,"%u.%u.20%02u (%u.%u.20%02u)",Sdate.Date,Sdate.Month,Sdate.Year, Sdate2.Date,Sdate2.Month,Sdate2.Year); | |
836 write_label_var( 20, 800, ME_Y_LINE3, &FontT42, text_content); | |
837 | |
838 text_content[0] = TXT_2BYTE; | |
839 text_content[1] = TXT2BYTE_LowestVoltage; | |
840 text_content[2] = 0; | |
841 write_label_var( 20, 800, ME_Y_LINE4, &FontT42, text_content); | |
842 | |
404
e729b8e7654d
Bugfix: display of time of minimum voltag:
ideenmodellierer
parents:
389
diff
changeset
|
843 translateDate(stateDeviceGetPointer()->voltageMinimum.date_rtc_dr, &Sdate); |
38 | 844 voltage = ((float)stateDeviceGetPointer()->voltageMinimum.value_int32) / 1000; |
845 snprintf(text_content,80,"%0.3fV (%u.%u.20%02u)",voltage, Sdate.Date,Sdate.Month,Sdate.Year); | |
846 write_label_var( 20, 800, ME_Y_LINE5, &FontT42, text_content); | |
847 | |
848 text_button[0] = TXT_2BYTE; | |
849 text_button[1] = TXT2BYTE_ButtonNext; | |
850 text_button[2] = 0; | |
851 break; | |
852 | |
853 case 2: | |
854 text_header[0] = '\001'; | |
855 text_header[1] = TXT_2BYTE; | |
856 text_header[2] = TXT2BYTE_Usage_Dives; | |
857 text_header[3] = 0; | |
858 | |
859 text_content[0] = TXT_2BYTE; | |
860 text_content[1] = TXT2BYTE_NumberOfDives; | |
861 text_content[2] = 0; | |
862 write_label_var( 20, 800, ME_Y_LINE1, &FontT42, text_content); | |
863 | |
57 | 864 snprintf(text_content,80,"%ld (%ld)",stateDeviceGetPointer()->diveCycles.value_int32,(stateDeviceGetPointer()->depthMaximum.value_int32 - 1000) / 100); |
38 | 865 write_label_var( 20, 800, ME_Y_LINE2, &FontT42, text_content); |
866 | |
867 translateDate(stateDeviceGetPointer()->diveCycles.date_rtc_dr, &Sdate); | |
868 translateDate(stateDeviceGetPointer()->depthMaximum.date_rtc_dr, &Sdate2); | |
869 snprintf(text_content,80,"%u.%u.20%02u (%u.%u.20%02u)",Sdate.Date,Sdate.Month,Sdate.Year, Sdate2.Date,Sdate2.Month,Sdate2.Year); | |
870 write_label_var( 20, 800, ME_Y_LINE3, &FontT42, text_content); | |
871 | |
872 text_content[0] = TXT_2BYTE; | |
873 text_content[1] = TXT2BYTE_HoursOfOperation; | |
874 text_content[2] = 0; | |
875 write_label_var( 20, 800, ME_Y_LINE4, &FontT42, text_content); | |
876 | |
57 | 877 snprintf(text_content,80,"%ld",(stateDeviceGetPointer()->hoursOfOperation.value_int32)/3600); |
38 | 878 write_label_var( 20, 800, ME_Y_LINE5, &FontT42, text_content); |
879 | |
880 text_button[0] = TXT_2BYTE; | |
881 text_button[1] = TXT2BYTE_ButtonNext; | |
882 text_button[2] = 0; | |
883 break; | |
884 | |
885 case 3: | |
886 text_header[0] = '\001'; | |
887 text_header[1] = TXT_2BYTE; | |
888 text_header[2] = TXT2BYTE_Usage_Environment; | |
889 text_header[3] = 0; | |
890 | |
891 text_content[0] = TXT_2BYTE; | |
892 text_content[1] = TXT2BYTE_AmbientTemperature; | |
893 text_content[2] = 0; | |
894 write_label_var( 20, 800, ME_Y_LINE1, &FontT42, text_content); | |
895 | |
896 temperature1 = ((float)stateDeviceGetPointer()->temperatureMinimum.value_int32) / 100; | |
897 temperature2 = ((float)stateDeviceGetPointer()->temperatureMaximum.value_int32) / 100; | |
898 snprintf(text_content,80,"%0.2f\140C / %0.2f\140C",temperature1,temperature2); | |
899 write_label_var( 20, 800, ME_Y_LINE2, &FontT42, text_content); | |
900 | |
901 translateDate(stateDeviceGetPointer()->temperatureMinimum.date_rtc_dr, &Sdate); | |
902 translateDate(stateDeviceGetPointer()->temperatureMaximum.date_rtc_dr, &Sdate2); | |
903 snprintf(text_content,80,"(%u.%u.20%02u / %u.%u.20%02u)",Sdate.Date,Sdate.Month,Sdate.Year, Sdate2.Date,Sdate2.Month,Sdate2.Year); | |
904 write_label_var( 20, 800, ME_Y_LINE3, &FontT42, text_content); | |
905 | |
906 text_content[0] = TXT_2BYTE; | |
907 text_content[1] = TXT2BYTE_Korrekturwerte; | |
908 text_content[2] = 0; | |
909 write_label_var( 20, 800, ME_Y_LINE4, &FontT42, text_content); | |
910 | |
911 offsetTemperature = ((float)settingsGetPointer()->offsetTemperature_centigrad) / 10; | |
103
f5d2f02dc73f
Generalize TEXT of pressure unit
Dmitry Romanov <kitt@bk.ru>
parents:
102
diff
changeset
|
912 snprintf(text_content,80,"%i %s / %0.2f\140C",settingsGetPointer()->offsetPressure_mbar, TEXT_PRESSURE_UNIT, offsetTemperature); |
38 | 913 write_label_var( 20, 800, ME_Y_LINE5, &FontT42, text_content); |
914 | |
915 text_button[0] = TXT_2BYTE; | |
916 text_button[1] = TXT2BYTE_Exit; | |
917 text_button[2] = 0; | |
918 break; | |
919 } | |
920 | |
921 write_topline(text_header); | |
520 | 922 tMenuEdit_newButtonText(StMSYS4_Info, text_button); |
38 | 923 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonNext,0); |
924 } | |
925 | |
926 | |
927 void openEdit_Reset(void) | |
928 { | |
929 char text[32]; | |
930 | |
931 text[0] = '\001'; | |
932 text[1] = TXT_2BYTE; | |
933 text[2] = TXT2BYTE_ResetMenu; | |
934 text[3] = 0; | |
935 write_topline(text); | |
936 | |
937 text[0] = TXT_2BYTE; | |
938 text[1] = TXT2BYTE_LogbookOffset; | |
939 text[7] = 0; | |
940 | |
941 write_label_var( 30, 400, ME_Y_LINE1, &FontT48, text); | |
942 | |
520 | 943 write_field_udigit(StMSYS5_LogbookOffset,420, 800, ME_Y_LINE1, &FontT48, "####", settingsGetPointer()->logbookOffset,0,0,0); |
38 | 944 |
945 text[0] = TXT_2BYTE; | |
946 text[2] = 0; | |
947 | |
948 text[1] = TXT2BYTE_ResetAll; | |
520 | 949 write_field_button(StMSYS5_ResetAll, 30, 800, ME_Y_LINE2, &FontT48, text); |
38 | 950 |
951 text[1] = TXT2BYTE_ResetDeco; | |
520 | 952 write_field_button(StMSYS5_ResetDeco, 30, 800, ME_Y_LINE3, &FontT48, text); |
38 | 953 |
954 text[1] = TXT2BYTE_Reboot; | |
520 | 955 write_field_button(StMSYS5_Reboot, 30, 800, ME_Y_LINE4, &FontT48, text); |
38 | 956 |
957 text[1] = TXT2BYTE_Maintenance; | |
520 | 958 write_field_button(StMSYS5_Maintenance, 30, 800, ME_Y_LINE5, &FontT48, text); |
38 | 959 |
960 #ifndef RESETLOGBLOCK | |
961 text[1] = TXT2BYTE_ResetLogbook; | |
520 | 962 write_field_button(StMSYS5_ResetLogbook,30, 800, ME_Y_LINE6, &FontT48, text); |
38 | 963 #else |
528
a9c195be907e
Added new option to gas configuration: "Off":
Ideenmodellierer
parents:
520
diff
changeset
|
964 text[0] = '\031'; |
38 | 965 text[1] = TXT_2BYTE; |
966 text[2] = TXT2BYTE_ResetLogbook; | |
967 text[3] = 0; | |
520 | 968 write_field_button(StMSYS5_ResetLogbook,30, 800, ME_Y_LINE6, &FontT48, text); |
38 | 969 text[0] = TXT_2BYTE; |
970 text[2] = 0; | |
971 #endif | |
972 | |
520 | 973 setEvent(StMSYS5_LogbookOffset, (uint32_t)OnAction_LogbookOffset); |
974 setEvent(StMSYS5_ResetAll, (uint32_t)OnAction_Confirm); | |
975 setEvent(StMSYS5_ResetDeco, (uint32_t)OnAction_Confirm); | |
976 setEvent(StMSYS5_Reboot, (uint32_t)OnAction_Confirm); | |
977 setEvent(StMSYS5_Maintenance, (uint32_t)OnAction_Confirm); | |
38 | 978 #ifndef RESETLOGBLOCK |
520 | 979 setEvent(StMSYS5_ResetLogbook, (uint32_t)OnAction_Confirm); |
38 | 980 #else |
520 | 981 setEvent(StMSYS5_ResetLogbook, (uint32_t)OnAction_Nothing); |
38 | 982 #endif |
983 | |
984 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); | |
985 } | |
986 | |
987 | |
988 void openEdit_ResetConfirmation(uint32_t editIdOfCaller) | |
989 { | |
990 char text[32]; | |
991 | |
992 resetMenuEdit(CLUT_MenuPageSystem); | |
993 | |
994 text[0] = '\001'; | |
995 text[1] = TXT_2BYTE; | |
996 text[2] = TXT2BYTE_AreYouSure; | |
997 text[3] = 0; | |
998 write_topline(text); | |
999 | |
1000 text[0] = TXT_2BYTE; | |
1001 text[2] = 0; | |
1002 text[1] = TXT2BYTE_Abort; | |
1003 | |
520 | 1004 write_field_button(StMSYS5_Exit, 30, 800, ME_Y_LINE1, &FontT48, text); |
38 | 1005 |
1006 text[2] = 0; | |
1007 text[3] = 0; | |
1008 switch(editIdOfCaller) | |
1009 { | |
520 | 1010 case StMSYS5_Reboot: |
1011 case StMSYS5_RebootRTE: | |
1012 case StMSYS5_RebootMainCPU: | |
38 | 1013 text[1] = TXT2BYTE_RebootMainCPU; |
520 | 1014 write_field_button(StMSYS5_RebootMainCPU, 30, 800, ME_Y_LINE2, &FontT48, text); |
38 | 1015 text[1] = TXT2BYTE_RebootRTE; |
520 | 1016 write_field_button(StMSYS5_RebootRTE, 30, 800, ME_Y_LINE3, &FontT48, text); |
1017 setEvent(StMSYS5_Exit, (uint32_t)OnAction_Exit); | |
1018 setEvent(StMSYS5_RebootMainCPU, (uint32_t)OnAction_RebootMainCPU); | |
1019 setEvent(StMSYS5_RebootRTE, (uint32_t)OnAction_RebootRTE); | |
38 | 1020 text[0] = '\025'; |
1021 text[1] = TXT_2BYTE; | |
1022 text[2] = TXT2BYTE_DecoDataLost; | |
1023 text[3] = 0; | |
1024 write_label_var( 30, 800, ME_Y_LINE4, &FontT48, text); | |
1025 break; | |
1026 | |
520 | 1027 case StMSYS5_ResetDeco: |
38 | 1028 text[1] = TXT2BYTE_ResetDeco; |
1029 write_field_button(editIdOfCaller, 30, 800, ME_Y_LINE2, &FontT48, text); | |
520 | 1030 setEvent(StMSYS5_Exit, (uint32_t)OnAction_Exit); |
38 | 1031 setEvent(editIdOfCaller, (uint32_t)OnAction_ResetDeco); |
1032 text[0] = '\025'; | |
1033 text[1] = TXT_2BYTE; | |
1034 text[2] = TXT2BYTE_DecoDataLost; | |
1035 text[3] = 0; | |
1036 write_label_var( 30, 800, ME_Y_LINE4, &FontT48, text); | |
1037 break; | |
1038 | |
520 | 1039 case StMSYS5_ResetAll: |
38 | 1040 text[1] = TXT2BYTE_ResetAll; |
1041 write_field_button(editIdOfCaller, 30, 800, ME_Y_LINE2, &FontT48, text); | |
520 | 1042 setEvent(StMSYS5_Exit, (uint32_t)OnAction_Exit); |
38 | 1043 setEvent(editIdOfCaller, (uint32_t)OnAction_ResetAll); |
1044 break; | |
1045 | |
520 | 1046 case StMSYS5_ResetLogbook: |
38 | 1047 text[1] = TXT2BYTE_ResetLogbook; |
1048 write_field_button(editIdOfCaller, 30, 800, ME_Y_LINE2, &FontT48, text); | |
520 | 1049 setEvent(StMSYS5_Exit, (uint32_t)OnAction_Exit); |
38 | 1050 setEvent(editIdOfCaller, (uint32_t)OnAction_ResetLogbook); |
1051 break; | |
1052 | |
520 | 1053 case StMSYS5_Maintenance: |
1054 case StMSYS5_SetBattCharge: | |
1055 case StMSYS5_SetSampleIndx: | |
38 | 1056 text[0] = TXT_2BYTE; |
1057 text[1] = TXT2BYTE_SetFactoryDefaults; | |
1058 text[2] = 0; | |
520 | 1059 write_field_button(StMSYS5_SetFactoryBC, 30, 800, ME_Y_LINE2, &FontT48, text); |
38 | 1060 |
424
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1061 #ifdef ENABLE_ANALYSE_SAMPLES |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1062 text[0] = TXT_2BYTE; |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1063 text[1] = TXT2BYTE_SetSampleIndex; |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1064 text[2] = 0; |
520 | 1065 write_field_button(StMSYS5_SetSampleIndx, 30, 800, ME_Y_LINE3, &FontT48, text); |
424
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1066 #endif |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1067 |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1068 |
38 | 1069 if(stateRealGetPointer()->lifeData.battery_charge == 0) |
1070 { | |
1071 text[0] = TXT_2BYTE; | |
1072 text[1] = TXT2BYTE_SetBatteryCharge; | |
1073 text[2] = 0; | |
1074 snprintf(&text[2],10,": %u%%",settingsGetPointer()->lastKnownBatteryPercentage); | |
424
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1075 #ifdef ENABLE_ANALYSE_SAMPLES |
520 | 1076 write_field_button(StMSYS5_SetBattCharge, 30, 800, ME_Y_LINE4, &FontT48, text); |
424
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1077 #else |
520 | 1078 write_field_button(StMSYS5_SetBattCharge, 30, 800, ME_Y_LINE3, &FontT48, text); |
424
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1079 #endif |
38 | 1080 |
520 | 1081 setEvent(StMSYS5_Exit, (uint32_t)OnAction_Exit); |
1082 setEvent(StMSYS5_SetFactoryBC, (uint32_t)OnAction_SetFactoryDefaults); | |
424
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1083 #ifdef ENABLE_ANALYSE_SAMPLES |
520 | 1084 setEvent(StMSYS5_SetSampleIndx, (uint32_t)OnAction_RecoverSampleIdx); |
424
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1085 #endif |
520 | 1086 setEvent(StMSYS5_SetBattCharge, (uint32_t)OnAction_SetBatteryCharge); |
38 | 1087 } |
1088 else | |
1089 { | |
520 | 1090 setEvent(StMSYS5_Exit, (uint32_t)OnAction_Exit); |
1091 setEvent(StMSYS5_SetFactoryBC, (uint32_t)OnAction_SetFactoryDefaults); | |
424
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1092 #ifdef ENABLE_ANALYSE_SAMPLES |
520 | 1093 setEvent(StMSYS5_SetSampleIndx, (uint32_t)OnAction_RecoverSampleIdx); |
424
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1094 #endif |
38 | 1095 } |
520 | 1096 // write_field_button(StMSYS5_ScreenTest, 30, 800, ME_Y_LINE3, &FontT48, "Screen Test"); |
1097 // setEvent(StMSYS5_ScreenTest, (uint32_t)OnAction_ScreenTest); | |
38 | 1098 |
1099 text[0] = TXT_2BYTE; | |
1100 text[1] = TXT2BYTE_WarnBatteryLow; | |
1101 text[2] = 0; | |
1102 snprintf(&text[2],10,": %01.2fV",stateRealGetPointer()->lifeData.battery_voltage); | |
435
8851702173e0
Bugfix display battery voltage in maintainance menu:
ideenmodellierer
parents:
424
diff
changeset
|
1103 write_label_var( 30, 800, ME_Y_LINE5, &FontT42, text); |
8851702173e0
Bugfix display battery voltage in maintainance menu:
ideenmodellierer
parents:
424
diff
changeset
|
1104 |
38 | 1105 snprintf(&text[0],30,"Code: %X",getLicence()); |
1106 write_label_var( 30, 800, ME_Y_LINE6, &FontT42, text); | |
1107 break; | |
1108 | |
1109 } | |
1110 | |
1111 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); | |
1112 } | |
1113 | |
1114 uint8_t OnAction_LogbookOffset(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1115 { | |
1116 uint8_t digitContentNew; | |
1117 uint32_t newOffset; | |
1118 | |
1119 if(action == ACTION_BUTTON_ENTER) | |
1120 return digitContent; | |
1121 | |
1122 if(action == ACTION_BUTTON_ENTER_FINAL) | |
1123 { | |
1124 evaluateNewString(editId, &newOffset, 0, 0, 0); | |
1125 if(newOffset > 9000) | |
1126 newOffset = 0; | |
1127 tMenuEdit_newInput(editId, newOffset, 0, 0, 0); | |
1128 settingsGetPointer()->logbookOffset = (uint16_t)newOffset; | |
1129 return UPDATE_DIVESETTINGS; | |
1130 } | |
1131 | |
1132 if(action == ACTION_BUTTON_NEXT) | |
1133 { | |
1134 digitContentNew = digitContent + 1; | |
1135 if(digitContentNew > '9') | |
1136 digitContentNew = '0'; | |
1137 return digitContentNew; | |
1138 } | |
1139 | |
1140 if(action == ACTION_BUTTON_BACK) | |
1141 { | |
1142 digitContentNew = digitContent - 1; | |
1143 if(digitContentNew < '0') | |
1144 digitContentNew = '9'; | |
1145 return digitContentNew; | |
1146 } | |
1147 return UNSPECIFIC_RETURN; | |
1148 } | |
1149 | |
1150 uint8_t OnAction_Nothing (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1151 { | |
1152 return UNSPECIFIC_RETURN; | |
1153 } | |
1154 | |
1155 uint8_t OnAction_Exit (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1156 { | |
1157 return EXIT_TO_MENU; | |
1158 } | |
1159 uint8_t OnAction_Confirm (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1160 { | |
1161 openEdit_ResetConfirmation(editId); | |
1162 return UNSPECIFIC_RETURN; | |
1163 } | |
1164 | |
1165 uint8_t OnAction_RebootRTE (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1166 { | |
1167 MX_SmallCPU_Reset_To_Standard(); | |
1168 return EXIT_TO_MENU; | |
1169 } | |
1170 | |
1171 uint8_t OnAction_ResetDeco (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1172 { | |
1173 clearDeco(); | |
1174 return EXIT_TO_MENU; | |
1175 } | |
1176 | |
1177 uint8_t OnAction_ResetAll (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1178 { | |
1179 set_settings_to_Standard(); | |
1180 check_and_correct_settings(); | |
1181 | |
1182 return UPDATE_AND_EXIT_TO_HOME; | |
1183 } | |
1184 | |
1185 uint8_t OnAction_ResetLogbook (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1186 { | |
1187 write_label_var( 430, 740, 350, &FontT42, "Wait"); | |
1188 ext_flash_erase_logbook(); | |
1189 | |
1190 SSettings * pSettings = settingsGetPointer(); | |
1191 pSettings->lastDiveLogId = 255; | |
1192 pSettings->logFlashNextSampleStartAddress = 0; | |
1193 | |
1194 return EXIT_TO_MENU; | |
1195 } | |
1196 | |
1197 uint8_t OnAction_RebootMainCPU (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1198 { | |
1199 settingsGetPointer()->showDebugInfo = 0; | |
1200 extern uint8_t bootToBootloader; | |
1201 bootToBootloader = 1; | |
1202 return UNSPECIFIC_RETURN; | |
1203 } | |
1204 | |
1205 | |
1206 uint8_t OnAction_SetFactoryDefaults(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1207 { | |
1208 settingsWriteFactoryDefaults(settingsGetPointer()->ButtonResponsiveness[3], settingsGetPointer()->buttonBalance); | |
1209 return EXIT_TO_MENU; | |
1210 } | |
1211 | |
468
aa1d71875e25
Moved and deactivated analyse sample buffer switch:
ideenmodellierer
parents:
446
diff
changeset
|
1212 #ifdef ENABLE_ANALYSE_SAMPLES |
424
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1213 uint8_t OnAction_RecoverSampleIdx(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1214 { |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1215 char text[32]; |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1216 char strResult[20]; |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1217 |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1218 ext_flash_AnalyseSampleBuffer(strResult); |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1219 snprintf(&text[0],30,"Ring: %s",strResult); //"Code: %X",settingsGetPointer()->logFlashNextSampleStartAddress); //getLicence()); |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1220 write_label_var( 30, 800, ME_Y_LINE6, &FontT42, text); |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1221 return UNSPECIFIC_RETURN; |
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1222 } |
468
aa1d71875e25
Moved and deactivated analyse sample buffer switch:
ideenmodellierer
parents:
446
diff
changeset
|
1223 #endif |
424
2b31cf1ebbcc
Added (optional) menu item to analyse log sample buffer:
ideenmodellierer
parents:
404
diff
changeset
|
1224 |
38 | 1225 uint8_t OnAction_SetBatteryCharge(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
1226 { | |
1227 setBatteryPercentage(settingsGetPointer()->lastKnownBatteryPercentage); | |
1228 // setBatteryPercentage(100); | |
1229 return EXIT_TO_MENU; | |
1230 } | |
1231 | |
1232 #ifdef SCREENTEST | |
1233 uint8_t OnAction_ScreenTest (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1234 { | |
1235 static uint8_t FrameCount = 1; // 0 is invisible frame | |
1236 char text[5]; | |
1237 GFX_DrawCfgScreen tTestScreen; | |
1238 tTestScreen.FBStartAdress = 0; | |
1239 tTestScreen.ImageHeight = 480; | |
1240 tTestScreen.ImageWidth = 800; | |
1241 tTestScreen.LayerIndex = 1; | |
1242 | |
520 | 1243 set_globalState(StMSYS5_ScreenTest); |
38 | 1244 tTestScreen.FBStartAdress = getFrameByNumber(FrameCount); |
1245 if(tTestScreen.FBStartAdress == 0) | |
1246 { | |
1247 extern uint8_t bootToBootloader; | |
1248 bootToBootloader = 1; | |
1249 } | |
1250 GFX_fill_buffer(tTestScreen.FBStartAdress, 0xFF, FrameCount); | |
1251 snprintf(text,5,"%u",FrameCount); | |
1252 Gfx_write_label_var(&tTestScreen, 10,100,10,&FontT48,CLUT_Font027,text); | |
1253 GFX_SetFramesTopBottom(tTestScreen.FBStartAdress, NULL,480); | |
1254 FrameCount++; | |
1255 } | |
1256 #endif | |
1257 /* | |
1258 uint8_t OnAction_TestCLog (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1259 { | |
1260 write_label_var( 430, 740, 350, &FontT42, "Wait"); | |
1261 | |
1262 test_log_only(20, 5); | |
1263 test_log_only(30, 10); | |
1264 ext_flash_write_settings(); | |
1265 return EXIT_TO_MENU; | |
1266 } | |
1267 */ | |
1268 |