Mercurial > public > ostc4
annotate Discovery/Src/tMenuEditSystem.c @ 382:14fd5f35cb50 MotionDetection
merge default
author | Ideenmodellierer |
---|---|
date | Thu, 10 Oct 2019 22:26:03 +0200 |
parents | 0dbf550dc743 c9d217b110cc |
children | 427ae9f8e28e |
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" |
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
|
41 #include "Motion.h" |
343
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
42 #include "t7.h" |
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
43 |
379 | 44 |
45 #define CV_SUBPAGE_MAX (2u) /* max number of customer view selection pages */ | |
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 |
379 | 49 |
343
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
50 static uint8_t infoPage = 0; |
38 | 51 |
52 /* Private function prototypes -----------------------------------------------*/ | |
53 void openEdit_DateTime(void); | |
54 void openEdit_Language(void); | |
55 void openEdit_Design(void); | |
56 void openEdit_Customview(void); | |
57 void openEdit_Information(void); | |
58 void openEdit_Reset(void); | |
59 void openEdit_CustomviewDivemode(uint8_t line); | |
60 //void openEdit_ShowDebugInfo(void); | |
61 //void openEdit_Salinity(void); | |
62 | |
63 /* Announced function prototypes -----------------------------------------------*/ | |
64 uint8_t OnAction_Date (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
65 uint8_t OnAction_Time (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
66 uint8_t OnAction_DDMMYY (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
67 uint8_t OnAction_MMDDYY (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
68 uint8_t OnAction_YYMMDD (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
69 uint8_t OnAction_DST (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
70 uint8_t OnAction_English (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
71 uint8_t OnAction_German (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
72 uint8_t OnAction_French (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
73 uint8_t OnAction_Italian (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
74 uint8_t OnAction_Espanol (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
75 //uint8_t OnAction_Design_t7 (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
76 //uint8_t OnAction_Design_t7ft (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
77 //uint8_t OnAction_Design_t3 (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
78 | |
79 uint8_t OnAction_Units (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
80 uint8_t OnAction_Colorscheme (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
81 uint8_t OnAction_DebugInfo (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
82 | |
83 uint8_t OnAction_CViewTimeout (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
84 uint8_t OnAction_CViewStandard (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
85 uint8_t OnAction_CornerTimeout (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
86 uint8_t OnAction_CornerStandard(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
87 uint8_t OnAction_ExtraDisplay (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
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
|
88 uint8_t OnAction_MotionCtrl (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
38 | 89 |
90 uint8_t OnAction_Exit (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
91 uint8_t OnAction_Confirm (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
92 uint8_t OnAction_RebootRTE (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
93 uint8_t OnAction_ResetDeco (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
94 uint8_t OnAction_ResetAll (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
95 uint8_t OnAction_ResetLogbook (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
96 uint8_t OnAction_RebootMainCPU (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
97 uint8_t OnAction_Nothing (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
98 uint8_t OnAction_LogbookOffset(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
99 uint8_t OnAction_SetFactoryDefaults(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
100 uint8_t OnAction_SetBatteryCharge(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
101 #ifdef SCREENTEST | |
102 uint8_t OnAction_ScreenTest (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
103 #endif | |
104 uint8_t OnAction_Information (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
105 /* | |
106 uint8_t OnAction_Salinity (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
107 uint8_t OnAction_TestCLog (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
108 */ | |
109 | |
110 /* Exported functions --------------------------------------------------------*/ | |
111 | |
112 void openEdit_System(uint8_t line) | |
113 { | |
114 set_globalState_Menu_Line(line); | |
115 resetMenuEdit(CLUT_MenuPageSystem); | |
116 | |
117 if(actual_menu_content == MENU_SURFACE) | |
118 { | |
119 switch(line) | |
120 { | |
121 case 1: | |
122 default: | |
123 openEdit_DateTime(); | |
124 break; | |
125 case 2: | |
126 openEdit_Language(); | |
127 break; | |
128 case 3: | |
129 openEdit_Design(); | |
130 break; | |
131 case 4: | |
132 openEdit_Customview(); | |
133 break; | |
134 case 5: | |
135 openEdit_Information(); | |
136 break; | |
137 case 6: | |
138 openEdit_Reset(); | |
139 break; | |
140 /* | |
141 case 3: | |
142 openEdit_DecoFutureTTS(); | |
143 break; | |
144 case 4: | |
145 openEdit_DecoLastStop(); | |
146 break; | |
147 */ | |
148 } | |
149 } | |
150 else | |
151 { | |
152 openEdit_CustomviewDivemode(line); | |
153 } | |
154 | |
155 } | |
156 | |
157 /* Private functions ---------------------------------------------------------*/ | |
158 | |
159 void openEdit_CustomviewDivemode(uint8_t line) | |
160 { | |
379 | 161 static uint8_t customviewsSubpage = 0; |
210
b2a9e9b02df0
New feature: make selected customviews persistent
Jan Mulder <jlmulder@xs4all.nl>
parents:
138
diff
changeset
|
162 SSettings *pSettings = settingsGetPointer(); |
b2a9e9b02df0
New feature: make selected customviews persistent
Jan Mulder <jlmulder@xs4all.nl>
parents:
138
diff
changeset
|
163 extern _Bool WriteSettings; |
379 | 164 char text[MAX_PAGE_TEXTSIZE]; |
165 uint16_t tabPosition; | |
166 uint32_t id; | |
210
b2a9e9b02df0
New feature: make selected customviews persistent
Jan Mulder <jlmulder@xs4all.nl>
parents:
138
diff
changeset
|
167 |
379 | 168 |
169 if((line == 6) || (cv_changelist[customviewsSubpage * 5 + line-1] == CVIEW_END)) /* select next set of views */ | |
170 { | |
171 customviewsSubpage++; | |
172 if(customviewsSubpage == CV_SUBPAGE_MAX) | |
173 { | |
174 customviewsSubpage = 0; | |
175 } | |
176 set_CustomsviewsSubpage(customviewsSubpage); | |
177 /* rebuild the selection page with the next set of customer views */ | |
178 id = tMSystem_refresh(0, text, &tabPosition, NULL); | |
179 tM_build_page(id, text, tabPosition, NULL); | |
180 openMenu(0); | |
181 } | |
182 else | |
183 { | |
184 pSettings->cv_configuration ^= 1 << (cv_changelist[customviewsSubpage * 5 + line-1]); | |
185 if(t7_GetEnabled_customviews() == 0) | |
186 { | |
187 pSettings->cv_configuration ^= (1 << CVIEW_noneOrDebug); | |
188 } | |
189 WriteSettings = 1; | |
190 InitMotionDetection(); /* consider new view setup for view selection by motion */ | |
191 exitMenuEdit_to_Menu_with_Menu_Update(); | |
192 } | |
38 | 193 } |
194 | |
195 | |
196 void openEdit_DateTime(void) | |
197 { | |
198 RTC_DateTypeDef Sdate; | |
199 RTC_TimeTypeDef Stime; | |
200 uint8_t day,month,year,hour,minute, dateFormat, ddmmyy, mmddyy, yymmdd; | |
201 char text[32]; | |
202 SSettings *pSettings; | |
203 const SDiveState * pStateReal = stateRealGetPointer(); | |
204 | |
205 pSettings = settingsGetPointer(); | |
206 translateDate(pStateReal->lifeData.dateBinaryFormat, &Sdate); | |
207 translateTime(pStateReal->lifeData.timeBinaryFormat, &Stime); | |
208 year = Sdate.Year; | |
209 month = Sdate.Month; | |
210 day = Sdate.Date; | |
211 hour = Stime.Hours; | |
212 minute= Stime.Minutes; | |
213 | |
214 if(year < 16) | |
215 year = 16; | |
216 | |
217 if(month < 1) | |
218 month = 1; | |
219 | |
220 if(day < 1) | |
221 day = 1; | |
222 | |
223 // daylightsaving = Stime.DayLightSaving; | |
224 dateFormat = pSettings->date_format; | |
225 ddmmyy = 0; | |
226 mmddyy = 0; | |
227 yymmdd = 0; | |
228 | |
229 if(dateFormat == DDMMYY) | |
230 ddmmyy = 1; | |
231 else | |
232 if(dateFormat == MMDDYY) | |
233 mmddyy = 1; | |
234 else | |
235 yymmdd = 1; | |
236 | |
237 text[0] = '\001'; | |
238 text[1] = TXT_DateAndTime; | |
239 text[2] = 0; | |
240 | |
241 write_topline(text); | |
242 | |
243 write_label_fix( 20, 340, ME_Y_LINE1, &FontT42, TXT_TimeConfig); | |
244 write_label_fix( 20, 340, ME_Y_LINE2, &FontT42, TXT_DateConfig); | |
245 write_label_var( 600, 800, ME_Y_LINE2, &FontT48, "\016\016DDMMYY\017"); | |
246 write_label_fix( 20, 790, ME_Y_LINE3, &FontT42, TXT_Format); | |
247 // write_label_fix( 350 ,580, 250, &FontT42, TXT_Daylightsaving); | |
248 | |
249 write_field_2digit(StMSYS1_Time, 320, 780, ME_Y_LINE1, &FontT48, "##:##", (uint32_t)hour, (uint32_t)minute, 0, 0); | |
250 write_field_2digit(StMSYS1_Date, 320, 780, ME_Y_LINE2, &FontT48, "##-##-20##", (uint32_t)day, (uint32_t)month, (uint32_t)year, 0); | |
251 write_field_on_off(StMSYS1_DDMMYY, 320, 790, ME_Y_LINE3, &FontT48, "DDMMYY", ddmmyy); | |
252 write_field_on_off(StMSYS1_MMDDYY, 320, 790, ME_Y_LINE4, &FontT48, "MMDDYY", mmddyy); | |
253 write_field_on_off(StMSYS1_YYMMDD, 320, 790, ME_Y_LINE5, &FontT48, "YYMMDD", yymmdd); | |
254 // write_field_on_off(StMSYS1_DST, 350, 580, 310, &FontT48, "Active", daylightsaving); | |
255 | |
256 setEvent(StMSYS1_Date, (uint32_t)OnAction_Date); | |
257 setEvent(StMSYS1_Time, (uint32_t)OnAction_Time); | |
258 setEvent(StMSYS1_DDMMYY, (uint32_t)OnAction_DDMMYY); | |
259 setEvent(StMSYS1_MMDDYY, (uint32_t)OnAction_MMDDYY); | |
260 setEvent(StMSYS1_YYMMDD, (uint32_t)OnAction_YYMMDD); | |
261 // setEvent(StMSYS1_DST, (uint32_t)OnAction_DST); | |
262 | |
263 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); | |
264 } | |
265 | |
266 | |
267 uint8_t OnAction_Date(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
268 { | |
269 uint8_t digitContentNew; | |
270 uint32_t newDay, newMonth, newYear; | |
271 RTC_DateTypeDef sdatestructure; | |
272 | |
273 | |
274 if(action == ACTION_BUTTON_ENTER) | |
275 { | |
276 return digitContent; | |
277 } | |
278 if(action == ACTION_BUTTON_ENTER_FINAL) | |
279 { | |
280 evaluateNewString(editId, &newDay, &newMonth, &newYear, 0); | |
281 if(newDay == 0) | |
282 newDay = 1; | |
283 if(newDay > 31) | |
284 newDay = 31; | |
285 if(newMonth == 0) | |
286 newMonth = 1; | |
287 if(newMonth > 12) | |
288 newMonth = 12; | |
289 if((newMonth == 2) && (newDay > 29)) | |
290 newDay = 29; | |
291 if((newDay > 30) && ((newMonth == 4) ||(newMonth == 6) ||(newMonth == 9) ||(newMonth == 11))) | |
292 newDay = 30; | |
293 if(newYear < 17) | |
294 newYear = 17; | |
295 if(newYear > 99) | |
296 newYear = 99; | |
297 | |
298 sdatestructure.Date = newDay; | |
299 sdatestructure.Month = newMonth; | |
300 sdatestructure.Year = newYear; | |
301 setWeekday(&sdatestructure); | |
302 | |
303 setDate(sdatestructure); | |
304 | |
305 tMenuEdit_newInput(editId, newDay, newMonth, newYear, 0); | |
306 return UNSPECIFIC_RETURN; | |
307 } | |
308 if(action == ACTION_BUTTON_NEXT) | |
309 { | |
310 digitContentNew = digitContent + 1; | |
311 if((blockNumber == 0) && (digitContentNew > '0' + 31)) | |
312 digitContentNew = '1'; | |
313 if((blockNumber == 1) && (digitContentNew > '0' + 12)) | |
314 digitContentNew = '1'; | |
315 // year range 2017-2018 | |
55
a7683f9765da
Italian activated (needs some fine tuning), special characters (?,?,?,?,? and others) currently not working...
heinrichsweikamp
parents:
38
diff
changeset
|
316 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
|
317 digitContentNew = '0' + 18; |
38 | 318 return digitContentNew; |
319 } | |
320 if(action == ACTION_BUTTON_BACK) | |
321 { | |
322 digitContentNew = digitContent - 1; | |
323 if((blockNumber == 0) && (digitContentNew < '1')) | |
324 digitContentNew = '0' + 31; | |
325 if((blockNumber == 1) && (digitContentNew < '1')) | |
326 digitContentNew = '0' + 12; | |
327 // year range 2016-2018 | |
328 if((blockNumber == 2) && (digitContentNew < '0' + 17)) | |
329 digitContentNew = '0' + 18; | |
330 return digitContentNew; | |
331 } | |
332 /* | |
333 if(action == ACTION_BUTTON_NEXT) | |
334 { | |
335 digitContentNew = digitContent + 1; | |
336 if((blockNumber == 2) && (digitNumber == 0) && (digitContentNew > '2')) | |
337 digitContentNew = '1'; | |
338 if((blockNumber == 0) && (digitNumber == 0) && (digitContentNew > '3')) | |
339 digitContentNew = '0'; | |
340 if((blockNumber == 1) && (digitNumber == 0) && (digitContentNew > '1')) | |
341 digitContentNew = '0'; | |
342 if(digitContentNew > '9') | |
343 digitContentNew = '0'; | |
344 return digitContentNew; | |
345 } | |
346 if(action == ACTION_BUTTON_BACK) | |
347 { | |
348 digitContentNew = digitContent - 1; | |
349 if((blockNumber == 2) && (digitNumber == 0) && (digitContentNew < '1')) | |
350 digitContentNew = '2'; | |
351 if((blockNumber == 0) && (digitNumber == 0) && (digitContentNew < '0')) | |
352 digitContentNew = '3'; | |
353 if((blockNumber == 1) && (digitNumber == 0) && (digitContentNew < '0')) | |
354 digitContentNew = '1'; | |
355 if(digitContentNew < '0') | |
356 digitContentNew = '9'; | |
357 return digitContentNew; | |
358 } | |
359 */ | |
360 return UNSPECIFIC_RETURN; | |
361 } | |
362 | |
363 | |
364 uint8_t OnAction_Time(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
365 { | |
366 uint8_t digitContentNew; | |
367 uint32_t newHour, newMinute; | |
368 RTC_TimeTypeDef stimestructure; | |
369 | |
370 if(action == ACTION_BUTTON_ENTER) | |
371 { | |
372 return digitContent; | |
373 } | |
374 if(action == ACTION_BUTTON_ENTER_FINAL) | |
375 { | |
376 evaluateNewString(editId, &newHour, &newMinute, 0, 0); | |
377 if(newHour > 23) | |
378 newHour = 23; | |
379 if(newMinute > 59) | |
380 newMinute = 59; | |
381 | |
382 stimestructure.Hours = newHour; | |
383 stimestructure.Minutes = newMinute; | |
384 stimestructure.Seconds = 0; | |
385 | |
386 setTime(stimestructure); | |
387 | |
388 tMenuEdit_newInput(editId, newHour, newMinute, 0, 0); | |
389 return UNSPECIFIC_RETURN; | |
390 } | |
391 if(action == ACTION_BUTTON_NEXT) | |
392 { | |
393 digitContentNew = digitContent + 1; | |
394 if((blockNumber == 0) && (digitContentNew > '0' + 23)) | |
395 digitContentNew = '0'; | |
396 if((blockNumber == 1) && (digitContentNew > '0' + 59)) | |
397 digitContentNew = '0'; | |
398 return digitContentNew; | |
399 } | |
400 if(action == ACTION_BUTTON_BACK) | |
401 { | |
402 digitContentNew = digitContent - 1; | |
403 if((blockNumber == 0) && (digitContentNew < '0')) | |
404 digitContentNew = '0' + 23; | |
405 if((blockNumber == 1) && (digitContentNew < '0')) | |
406 digitContentNew = '0' + 59; | |
407 return digitContentNew; | |
408 } | |
409 /* | |
410 if(action == ACTION_BUTTON_NEXT) | |
411 { | |
412 digitContentNew = digitContent + 1; | |
413 if((blockNumber == 0) && (digitNumber == 0) && (digitContentNew > '2')) | |
414 digitContentNew = '0'; | |
415 if((blockNumber == 1) && (digitNumber == 0) && (digitContentNew > '5')) | |
416 digitContentNew = '0'; | |
417 if(digitContentNew > '9') | |
418 digitContentNew = '0'; | |
419 return digitContentNew; | |
420 } | |
421 if(action == ACTION_BUTTON_BACK) | |
422 { | |
423 digitContentNew = digitContent - 1; | |
424 if((blockNumber == 0) && (digitNumber == 0) && (digitContentNew < '0')) | |
425 digitContentNew = '2'; | |
426 if((blockNumber == 1) && (digitNumber == 0) && (digitContentNew < '0')) | |
427 digitContentNew = '5'; | |
428 if(digitContentNew < '0') | |
429 digitContentNew = '9'; | |
430 return digitContentNew; | |
431 } | |
432 */ | |
433 return UNSPECIFIC_RETURN; | |
434 } | |
435 | |
436 | |
437 uint8_t OnAction_DDMMYY(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
438 { | |
439 SSettings *pSettings; | |
440 | |
441 pSettings = settingsGetPointer(); | |
442 pSettings->date_format = DDMMYY; | |
443 | |
444 tMenuEdit_set_on_off(editId, 1); | |
445 tMenuEdit_set_on_off(StMSYS1_MMDDYY, 0); | |
446 tMenuEdit_set_on_off(StMSYS1_YYMMDD, 0); | |
447 | |
448 return UNSPECIFIC_RETURN; | |
449 } | |
450 | |
451 | |
452 uint8_t OnAction_MMDDYY(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
453 { | |
454 SSettings *pSettings; | |
455 | |
456 pSettings = settingsGetPointer(); | |
457 pSettings->date_format = MMDDYY; | |
458 | |
459 tMenuEdit_set_on_off(editId, 1); | |
460 tMenuEdit_set_on_off(StMSYS1_DDMMYY, 0); | |
461 tMenuEdit_set_on_off(StMSYS1_YYMMDD, 0); | |
462 | |
463 return UNSPECIFIC_RETURN; | |
464 } | |
465 | |
466 | |
467 uint8_t OnAction_YYMMDD(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
468 { | |
469 SSettings *pSettings; | |
470 | |
471 pSettings = settingsGetPointer(); | |
472 pSettings->date_format = YYMMDD; | |
473 | |
474 tMenuEdit_set_on_off(editId, 1); | |
475 tMenuEdit_set_on_off(StMSYS1_MMDDYY, 0); | |
476 tMenuEdit_set_on_off(StMSYS1_DDMMYY, 0); | |
477 | |
478 return UNSPECIFIC_RETURN; | |
479 } | |
480 | |
481 | |
482 uint8_t OnAction_DST(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
483 { | |
484 RTC_TimeTypeDef stimestructure; | |
485 uint8_t newDST; | |
486 | |
487 get_RTC_DateTime(0, &stimestructure); | |
488 newDST = stimestructure.DayLightSaving; | |
489 if(newDST) | |
490 newDST = 0; | |
491 else | |
492 newDST = 1; | |
493 stimestructure.DayLightSaving = newDST; | |
494 set_RTC_DateTime(0, &stimestructure); | |
495 | |
496 tMenuEdit_set_on_off(editId, newDST); | |
497 | |
498 return UNSPECIFIC_RETURN; | |
499 } | |
500 | |
501 | |
502 void openEdit_Language(void) | |
503 { | |
504 char text[32]; | |
505 uint8_t actualLanguage, active; | |
506 SSettings *pSettings; | |
507 | |
508 pSettings = settingsGetPointer(); | |
509 actualLanguage = pSettings->selected_language; | |
510 | |
511 text[0] = '\001'; | |
512 text[1] = TXT_Language; | |
513 text[2] = 0; | |
514 write_topline(text); | |
515 | |
516 text[0] = TXT_LanguageName; | |
517 text[1] = 0; | |
518 | |
519 pSettings->selected_language = LANGUAGE_English; | |
520 if( actualLanguage == pSettings->selected_language) | |
521 active = 1; | |
522 else | |
523 active = 0; | |
524 write_field_on_off(StMSYS2_English, 30, 500, ME_Y_LINE1, &FontT48, text, active); | |
525 | |
526 pSettings->selected_language = LANGUAGE_German; | |
527 if( actualLanguage == pSettings->selected_language) | |
528 active = 1; | |
529 else | |
530 active = 0; | |
531 write_field_on_off(StMSYS2_German, 30, 800, ME_Y_LINE2, &FontT48, text, active); | |
532 | |
533 pSettings->selected_language = LANGUAGE_French; | |
534 if( actualLanguage == pSettings->selected_language) | |
535 active = 1; | |
536 else | |
537 active = 0; | |
538 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
|
539 |
38 | 540 |
541 pSettings->selected_language = LANGUAGE_Italian; | |
542 if( actualLanguage == pSettings->selected_language) | |
543 active = 1; | |
544 else | |
545 active = 0; | |
546 write_field_on_off(StMSYS2_Italian, 30, 800, ME_Y_LINE4, &FontT48, text, active); | |
547 | |
102
4276d56eb37c
hPa instead of mbar, enabled Spanish language
heinrichsweikamp
parents:
64
diff
changeset
|
548 |
38 | 549 pSettings->selected_language = LANGUAGE_Espanol; |
550 if( actualLanguage == pSettings->selected_language) | |
551 active = 1; | |
552 else | |
553 active = 0; | |
554 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
|
555 |
38 | 556 pSettings->selected_language = actualLanguage; |
557 | |
558 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); | |
559 | |
560 setEvent(StMSYS2_English, (uint32_t)OnAction_English); | |
561 setEvent(StMSYS2_German, (uint32_t)OnAction_German); | |
562 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
|
563 setEvent(StMSYS2_Italian, (uint32_t)OnAction_Italian); |
102
4276d56eb37c
hPa instead of mbar, enabled Spanish language
heinrichsweikamp
parents:
64
diff
changeset
|
564 setEvent(StMSYS2_Espanol, (uint32_t)OnAction_Espanol); |
38 | 565 } |
566 | |
567 | |
568 uint8_t OnAction_English (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
569 { | |
570 SSettings *pSettings = settingsGetPointer(); | |
571 pSettings->selected_language = LANGUAGE_English; | |
572 return EXIT_TO_MENU_WITH_LOGO; | |
573 } | |
574 | |
575 | |
576 uint8_t OnAction_German (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
577 { | |
578 SSettings *pSettings = settingsGetPointer(); | |
579 pSettings->selected_language = LANGUAGE_German; | |
580 return EXIT_TO_MENU_WITH_LOGO; | |
581 } | |
582 | |
583 | |
584 uint8_t OnAction_French (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
585 { | |
586 SSettings *pSettings = settingsGetPointer(); | |
587 pSettings->selected_language = LANGUAGE_French; | |
588 return EXIT_TO_MENU_WITH_LOGO; | |
589 } | |
590 | |
591 | |
592 uint8_t OnAction_Italian (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
593 { | |
594 SSettings *pSettings = settingsGetPointer(); | |
595 pSettings->selected_language = LANGUAGE_Italian; | |
596 return EXIT_TO_MENU_WITH_LOGO; | |
597 } | |
598 | |
599 | |
600 uint8_t OnAction_Espanol (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
601 { | |
602 SSettings *pSettings = settingsGetPointer(); | |
603 pSettings->selected_language = LANGUAGE_Espanol; | |
604 return EXIT_TO_MENU_WITH_LOGO; | |
605 } | |
606 | |
607 | |
608 void openEdit_Design(void) | |
609 { | |
610 refresh_Design(); | |
611 | |
612 write_field_button(StMSYS3_Units, 400, 700, ME_Y_LINE1, &FontT48, ""); | |
613 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
|
614 #ifdef HAVE_DEBUG_VIEW |
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
615 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
|
616 #endif |
38 | 617 setEvent(StMSYS3_Units, (uint32_t)OnAction_Units); |
618 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
|
619 #ifdef HAVE_DEBUG_VIEW |
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
620 setEvent(StMSYS3_Debug, (uint32_t)OnAction_DebugInfo); |
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
621 #endif |
38 | 622 } |
623 | |
624 | |
625 void refresh_Design(void) | |
626 { | |
627 char text[32]; | |
628 | |
629 // header | |
630 text[0] = '\001'; | |
631 text[1] = TXT_2BYTE; | |
632 text[2] = TXT2BYTE_Layout; | |
633 text[3] = 0; | |
634 write_topline(text); | |
635 | |
636 // units | |
637 text[0] = TXT_2BYTE; | |
638 text[1] = TXT2BYTE_Units; | |
639 text[2] = 0; | |
640 write_label_var( 30, 200, ME_Y_LINE1, &FontT48, text); | |
641 | |
642 if(settingsGetPointer()->nonMetricalSystem) | |
643 { | |
644 text[1] = TXT2BYTE_Units_feet; | |
645 } | |
646 else | |
647 { | |
648 text[1] = TXT2BYTE_Units_metric; | |
649 } | |
650 write_label_var( 400, 700, ME_Y_LINE1, &FontT48, text); | |
651 | |
652 // colorscheme | |
653 text[0] = TXT_2BYTE; | |
654 text[1] = TXT2BYTE_Farbschema; | |
655 text[2] = 0; | |
118
ee7f2cd9b9b4
Enlarge text limits to get string displayed completly
Ideenmodellierer
parents:
103
diff
changeset
|
656 write_label_var( 30, 300, ME_Y_LINE2, &FontT48, text); |
38 | 657 |
658 text[0] = '0' + settingsGetPointer()->tX_colorscheme; | |
659 text[1] = 0; | |
660 write_label_var( 400, 700, ME_Y_LINE2, &FontT48, text); | |
661 | |
343
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
662 #ifdef HAVE_DEBUG_VIEW |
38 | 663 // specials |
664 text[0] = TXT_2BYTE; | |
665 text[1] = TXT2BYTE_ShowDebug; | |
666 text[2] = 0; | |
667 write_label_var( 30, 700, ME_Y_LINE3, &FontT48, text); | |
668 | |
669 if(settingsGetPointer()->showDebugInfo) | |
670 text[0] = '\005'; | |
671 else | |
672 text[0] = '\006'; | |
673 text[1] = 0; | |
674 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
|
675 #endif |
38 | 676 |
677 // design | |
678 text[0] = TXT_Depth; | |
679 text[1] = 0; | |
680 write_content( 30, 700, ME_Y_LINE4, &FontT24, text, CLUT_Font031); | |
681 write_content( 30, 700, ME_Y_LINE4 + 30 + 70, &FontT48, "___________", CLUT_DIVE_FieldSeperatorLines); | |
682 write_content(280, 700, ME_Y_LINE4 + 30 + 70 - 3, &FontT48, "|", CLUT_DIVE_pluginbox); | |
683 write_content(290, 700, ME_Y_LINE4 + 30 + 70 - 37, &FontT48, "_______________", CLUT_DIVE_pluginbox); | |
684 write_content( 30, 700, ME_Y_LINE4 + 30, &FontT144, "24.7", CLUT_Font027); | |
685 | |
686 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); | |
687 } | |
688 | |
689 | |
690 uint8_t OnAction_Units(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
691 { | |
692 settingsGetPointer()->nonMetricalSystem = !(settingsGetPointer()->nonMetricalSystem); | |
693 return EXIT_TO_MENU_WITH_LOGO;//UPDATE_DIVESETTINGS; | |
694 } | |
695 | |
696 | |
697 uint8_t OnAction_Colorscheme(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
698 { | |
699 uint8_t newColorscheme; | |
700 | |
701 newColorscheme = settingsGetPointer()->tX_colorscheme + 1; | |
702 | |
703 if(newColorscheme > 3) | |
704 newColorscheme = 0; | |
705 | |
706 settingsGetPointer()->tX_colorscheme = newColorscheme; | |
707 GFX_use_colorscheme(newColorscheme); | |
708 tHome_init_compass(); | |
709 return UNSPECIFIC_RETURN; | |
710 } | |
711 | |
712 | |
713 uint8_t OnAction_DebugInfo(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
714 { | |
715 settingsGetPointer()->showDebugInfo = !(settingsGetPointer()->showDebugInfo); | |
716 return UPDATE_DIVESETTINGS; | |
717 } | |
718 | |
719 | |
720 | |
721 | |
722 /* | |
723 uint8_t OnAction_Design_t7ft (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
724 { | |
725 SSettings *pSettings = settingsGetPointer(); | |
726 if((pSettings->design == 7) && pSettings->nonMetricalSystem) | |
727 return EXIT_TO_MENU; | |
728 pSettings->design = 7; | |
729 pSettings->nonMetricalSystem = 1; | |
730 tMenuEdit_set_on_off(StMSYS3_t7, 0); | |
731 tMenuEdit_set_on_off(StMSYS3_t7ft, 1); | |
732 tMenuEdit_set_on_off(StMSYS3_t3, 0); | |
733 return UPDATE_DIVESETTINGS; | |
734 } | |
735 | |
736 | |
737 uint8_t OnAction_Design_t7 (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
738 { | |
739 SSettings *pSettings = settingsGetPointer(); | |
740 if((pSettings->design == 7) && (pSettings->nonMetricalSystem == 0)) | |
741 return EXIT_TO_MENU; | |
742 pSettings->design = 7; | |
743 pSettings->nonMetricalSystem = 0; | |
744 tMenuEdit_set_on_off(StMSYS3_t7, 1); | |
745 tMenuEdit_set_on_off(StMSYS3_t7ft, 0); | |
746 tMenuEdit_set_on_off(StMSYS3_t3, 0); | |
747 return UPDATE_DIVESETTINGS; | |
748 } | |
749 | |
750 | |
751 uint8_t OnAction_Design_t3 (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
752 { | |
753 SSettings *pSettings = settingsGetPointer(); | |
754 if(pSettings->design == 3) | |
755 return EXIT_TO_MENU; | |
756 pSettings->design = 3; | |
757 pSettings->nonMetricalSystem = 0; | |
758 tMenuEdit_set_on_off(StMSYS3_t7, 0); | |
759 tMenuEdit_set_on_off(StMSYS3_t7ft,0); | |
760 tMenuEdit_set_on_off(StMSYS3_t3, 1); | |
761 return UPDATE_DIVESETTINGS; | |
762 } | |
763 */ | |
764 | |
765 | |
766 void openEdit_Customview(void) | |
767 { | |
768 refresh_Customviews(); | |
769 | |
770 write_field_button(StMSYS4_CViewTimeout, 400, 700, ME_Y_LINE1, &FontT48, ""); | |
771 write_field_button(StMSYS4_CViewStandard, 400, 700, ME_Y_LINE2, &FontT48, ""); | |
772 | |
773 write_field_button(StMSYS4_CornerTimeout, 400, 700, ME_Y_LINE3, &FontT48, ""); | |
343
c9d217b110cc
Added compile switch to enable debug view option in system menu
ideenmodellierer
parents:
259
diff
changeset
|
774 write_field_button(StMSYS4_CornerStandard, 400, 700, ME_Y_LINE4, &FontT48, ""); |
38 | 775 |
776 write_field_button(StMSYS4_ExtraDisplay, 400, 700, ME_Y_LINE5, &FontT48, ""); | |
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
|
777 write_field_button(StMSYS4_MotionCtrl, 400, 700, ME_Y_LINE6, &FontT48, ""); |
38 | 778 |
779 setEvent(StMSYS4_CViewTimeout, (uint32_t)OnAction_CViewTimeout); | |
780 setEvent(StMSYS4_CViewStandard, (uint32_t)OnAction_CViewStandard); | |
781 | |
782 setEvent(StMSYS4_CornerTimeout, (uint32_t)OnAction_CornerTimeout); | |
783 setEvent(StMSYS4_CornerStandard, (uint32_t)OnAction_CornerStandard); | |
784 | |
785 setEvent(StMSYS4_ExtraDisplay, (uint32_t)OnAction_ExtraDisplay); | |
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
|
786 setEvent(StMSYS4_MotionCtrl, (uint32_t)OnAction_MotionCtrl); |
38 | 787 } |
788 | |
789 | |
790 void refresh_Customviews(void) | |
791 { | |
792 char text[32]; | |
793 uint8_t textpointer = 0; | |
794 | |
795 // header | |
796 text[0] = '\001'; | |
797 text[1] = TXT_2BYTE; | |
798 text[2] = TXT2BYTE_Customviews; | |
799 text[3] = 0; | |
800 write_topline(text); | |
801 | |
802 // custom view center return | |
803 textpointer = 0; | |
804 text[textpointer++] = TXT_2BYTE; | |
805 text[textpointer++] = TXT2BYTE_CViewTimeout; | |
806 textpointer += snprintf(&text[textpointer],11," %02u\016\016 %c\017",settingsGetPointer()->tX_customViewTimeout,TXT_Seconds); | |
807 write_label_var( 30, 700, ME_Y_LINE1, &FontT48, text); | |
808 | |
809 // custom view center primary | |
810 text[0] = TXT_2BYTE; | |
811 text[1] = TXT2BYTE_CViewStandard; | |
812 text[2] = ' '; | |
813 text[3] = ' '; | |
814 switch(settingsGetPointer()->tX_customViewPrimary) | |
815 { | |
816 case CVIEW_sensors: | |
817 text[4] = TXT_2BYTE; | |
818 text[5] = TXT2BYTE_O2monitor; | |
819 break; | |
820 case CVIEW_sensors_mV: | |
821 text[4] = TXT_2BYTE; | |
822 text[5] = TXT2BYTE_O2voltage; | |
823 break; | |
824 case CVIEW_Compass: | |
825 text[4] = TXT_2BYTE; | |
826 text[5] = TXT2BYTE_Compass; | |
827 break; | |
828 case CVIEW_Decolist: | |
829 text[4] = TXT_2BYTE; | |
830 text[5] = TXT2BYTE_Decolist; | |
831 break; | |
832 case CVIEW_Tissues: | |
833 text[4] = TXT_2BYTE; | |
834 text[5] = TXT2BYTE_Tissues; | |
835 break; | |
836 case CVIEW_Profile: | |
837 text[4] = TXT_2BYTE; | |
838 text[5] = TXT2BYTE_Profile; | |
839 break; | |
840 case CVIEW_Gaslist: | |
841 text[4] = TXT_2BYTE; | |
842 text[5] = TXT2BYTE_Gaslist; | |
843 break; | |
844 case CVIEW_EADTime: | |
845 text[4] = TXT_2BYTE; | |
846 text[5] = TXT2BYTE_Info; | |
847 break; | |
848 case CVIEW_SummaryOfLeftCorner: | |
849 text[4] = TXT_2BYTE; | |
850 text[5] = TXT2BYTE_Summary; | |
851 break; | |
852 case CVIEW_noneOrDebug: | |
853 text[4] = ' '; | |
854 text[5] = '-'; | |
855 break; | |
856 default: | |
857 snprintf(&text[4],3,"%02u",settingsGetPointer()->tX_customViewPrimary); | |
858 break; | |
859 } | |
860 text[6] = 0; | |
861 write_label_var( 30, 700, ME_Y_LINE2, &FontT48, text); | |
862 | |
863 | |
864 // field corner return | |
865 textpointer = 0; | |
866 text[textpointer++] = TXT_2BYTE; | |
867 text[textpointer++] = TXT2BYTE_CornerTimeout; | |
868 textpointer += snprintf(&text[textpointer],11," %02u\016\016 %c\017",settingsGetPointer()->tX_userselectedLeftLowerCornerTimeout,TXT_Seconds); | |
869 write_label_var( 30, 700, ME_Y_LINE3, &FontT48, text); | |
870 | |
871 // field corner primary | |
872 text[0] = TXT_2BYTE; | |
873 text[1] = TXT2BYTE_CornerStandard; | |
874 text[2] = ' '; | |
875 text[3] = ' '; | |
876 switch(settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary) | |
877 { | |
878 /* Temperature */ | |
879 case 1: | |
880 text[4] = TXT_Temperature; | |
881 break; | |
882 /* Average Depth */ | |
883 case 2: | |
884 text[4] = TXT_AvgDepth; | |
885 break; | |
886 /* ppO2 */ | |
887 case 3: | |
888 text[4] = TXT_ppO2; | |
889 break; | |
890 /* Stop Uhr */ | |
891 case 4: | |
892 text[4] = TXT_Stopwatch; | |
893 break; | |
894 /* Ceiling */ | |
895 case 5: | |
896 text[4] = TXT_Ceiling; | |
897 break; | |
898 /* Future TTS */ | |
899 case 6: | |
900 text[4] = TXT_FutureTTS; | |
901 break; | |
902 /* CNS */ | |
903 case 7: | |
904 text[4] = TXT_CNS; | |
905 break; | |
259
26c874cdde0d
feature: allow new saturation to be set in lower left corner
Jan Mulder <jlmulder@xs4all.nl>
parents:
210
diff
changeset
|
906 case 8: |
26c874cdde0d
feature: allow new saturation to be set in lower left corner
Jan Mulder <jlmulder@xs4all.nl>
parents:
210
diff
changeset
|
907 text[4] = TXT_ActualGradient; |
26c874cdde0d
feature: allow new saturation to be set in lower left corner
Jan Mulder <jlmulder@xs4all.nl>
parents:
210
diff
changeset
|
908 break; |
38 | 909 /* none */ |
910 case 0: | |
911 text[4] = '-'; | |
912 break; | |
913 default: | |
914 snprintf(&text[4],2,"%u",settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary); | |
915 break; | |
916 } | |
917 text[5] = 0; | |
918 write_label_var( 30, 700, ME_Y_LINE4, &FontT48, text); | |
919 | |
920 | |
921 // extra display | |
922 text[0] = TXT_2BYTE; | |
923 text[1] = TXT2BYTE_ExtraDisplay; | |
924 text[2] = ' '; | |
925 text[3] = ' '; | |
926 text[4] = TXT_2BYTE; | |
927 switch(settingsGetPointer()->extraDisplay) | |
928 { | |
929 /* BigFont */ | |
930 case EXTRADISPLAY_BIGFONT: | |
931 text[5] = TXT2BYTE_ExtraBigFont; | |
932 break; | |
933 /* DecoGame */ | |
934 case EXTRADISPLAY_DECOGAME: | |
935 text[5] = TXT2BYTE_ExtraDecoGame; | |
936 break; | |
937 /* none */ | |
938 case EXTRADISPLAY_none: | |
939 text[5] = TXT2BYTE_ExtraNone; | |
940 break; | |
941 default: | |
942 snprintf(&text[4],2,"%u",settingsGetPointer()->extraDisplay); | |
943 break; | |
944 } | |
945 text[6] = 0; | |
946 write_label_var( 30, 700, ME_Y_LINE5, &FontT48, text); | |
947 | |
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
|
948 |
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
|
949 /* MotionCtrl */ |
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
|
950 text[0] = TXT_2BYTE; |
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
|
951 text[1] = TXT2BYTE_MotionCtrl; |
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
|
952 text[2] = ' '; |
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
|
953 text[3] = ' '; |
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
|
954 text[4] = TXT_2BYTE; |
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
|
955 switch(settingsGetPointer()->MotionDetection) |
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
|
956 { |
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
|
957 case MOTION_DETECT_OFF: |
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
|
958 text[5] = TXT2BYTE_MoCtrlNone; |
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
|
959 break; |
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
|
960 case MOTION_DETECT_MOVE: |
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
|
961 text[5] = TXT2BYTE_MoCtrlPitch; |
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
|
962 break; |
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
|
963 case MOTION_DETECT_SECTOR: |
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
|
964 text[5] = TXT2BYTE_MoCtrlSector; |
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
|
965 break; |
373
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
966 case MOTION_DETECT_SCROLL: |
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
967 text[5] = TXT2BYTE_MoCtrlScroll; |
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
968 break; |
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
|
969 default: |
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
|
970 snprintf(&text[4],2,"%u",settingsGetPointer()->MotionDetection); |
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
|
971 break; |
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
|
972 } |
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
|
973 text[6] = 0; |
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
|
974 write_label_var( 30, 700, ME_Y_LINE6, &FontT48, text); |
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
|
975 |
38 | 976 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); |
977 } | |
978 | |
979 | |
980 uint8_t OnAction_CViewTimeout(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
981 { | |
982 uint8_t value; | |
983 value = settingsGetPointer()->tX_customViewTimeout; | |
984 | |
985 if(value < 5) | |
986 value = 5; | |
987 else if(value < 10) | |
988 value = 10; | |
989 else if(value < 15) | |
990 value = 15; | |
991 else if(value < 20) | |
992 value = 20; | |
993 else if(value < 30) | |
994 value = 30; | |
995 else if(value < 45) | |
996 value = 45; | |
997 else if(value < 60) | |
998 value = 60; | |
999 else | |
1000 value = 0; | |
1001 | |
1002 settingsGetPointer()->tX_customViewTimeout = value; | |
1003 return UPDATE_DIVESETTINGS; | |
1004 } | |
1005 | |
1006 | |
1007 uint8_t OnAction_CViewStandard(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1008 { | |
1009 uint8_t newValue; | |
1010 switch(settingsGetPointer()->tX_customViewPrimary) | |
1011 { | |
1012 case CVIEW_sensors: | |
1013 newValue = CVIEW_sensors_mV; | |
1014 break; | |
1015 case CVIEW_sensors_mV: | |
1016 newValue = CVIEW_Compass; | |
1017 break; | |
1018 case CVIEW_Compass: | |
1019 newValue = CVIEW_Decolist; | |
1020 break; | |
1021 case CVIEW_Decolist: | |
1022 newValue = CVIEW_Tissues; | |
1023 break; | |
1024 case CVIEW_Tissues: | |
1025 newValue = CVIEW_Profile; | |
1026 break; | |
1027 case CVIEW_Profile: | |
1028 newValue = CVIEW_Gaslist; | |
1029 break; | |
1030 case CVIEW_Gaslist: | |
1031 newValue = CVIEW_EADTime; | |
1032 break; | |
1033 case CVIEW_EADTime: | |
1034 newValue = CVIEW_SummaryOfLeftCorner; | |
1035 break; | |
1036 case CVIEW_SummaryOfLeftCorner: | |
1037 newValue = CVIEW_noneOrDebug; | |
1038 break; | |
1039 case CVIEW_noneOrDebug: | |
1040 default: | |
138 | 1041 newValue = CVIEW_sensors; |
38 | 1042 break; |
1043 } | |
1044 settingsGetPointer()->tX_customViewPrimary = newValue; | |
1045 return UPDATE_DIVESETTINGS; | |
1046 } | |
1047 | |
1048 | |
1049 uint8_t OnAction_CornerTimeout(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1050 { | |
1051 uint8_t value; | |
1052 value = settingsGetPointer()->tX_userselectedLeftLowerCornerTimeout; | |
1053 | |
1054 if(value < 5) | |
1055 value = 5; | |
1056 else if(value < 10) | |
1057 value = 10; | |
1058 else if(value < 15) | |
1059 value = 15; | |
1060 else if(value < 20) | |
1061 value = 20; | |
1062 else if(value < 30) | |
1063 value = 30; | |
1064 else if(value < 45) | |
1065 value = 45; | |
1066 else if(value < 60) | |
1067 value = 60; | |
1068 else | |
1069 value = 0; | |
1070 | |
1071 settingsGetPointer()->tX_userselectedLeftLowerCornerTimeout = value; | |
1072 return UPDATE_DIVESETTINGS; | |
1073 } | |
1074 | |
1075 | |
1076 uint8_t OnAction_CornerStandard(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1077 { | |
1078 uint8_t value; | |
1079 value = settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary; | |
1080 | |
1081 value += 1; | |
1082 | |
259
26c874cdde0d
feature: allow new saturation to be set in lower left corner
Jan Mulder <jlmulder@xs4all.nl>
parents:
210
diff
changeset
|
1083 if(value > 8) |
38 | 1084 value = 0; |
1085 | |
1086 settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary = value; | |
1087 return UPDATE_DIVESETTINGS; | |
1088 } | |
1089 | |
1090 | |
1091 uint8_t OnAction_ExtraDisplay (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1092 { | |
1093 uint8_t newValue; | |
1094 switch(settingsGetPointer()->extraDisplay) | |
1095 { | |
1096 case EXTRADISPLAY_BIGFONT: | |
1097 newValue = EXTRADISPLAY_none; | |
1098 break; | |
1099 case EXTRADISPLAY_DECOGAME: | |
1100 newValue = EXTRADISPLAY_BIGFONT; | |
1101 break; | |
1102 case EXTRADISPLAY_none: | |
1103 newValue = EXTRADISPLAY_BIGFONT; | |
1104 break; | |
1105 default: | |
1106 newValue = EXTRADISPLAY_BIGFONT; | |
1107 break; | |
1108 } | |
1109 settingsGetPointer()->extraDisplay = newValue; | |
1110 return UNSPECIFIC_RETURN; | |
1111 } | |
1112 | |
1113 | |
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
|
1114 uint8_t OnAction_MotionCtrl (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
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
|
1115 { |
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
|
1116 uint8_t newValue; |
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
|
1117 switch(settingsGetPointer()->MotionDetection) |
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
|
1118 { |
373
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
1119 case MOTION_DETECT_OFF: |
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
1120 newValue = MOTION_DETECT_MOVE; |
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
|
1121 break; |
373
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
1122 case MOTION_DETECT_MOVE: |
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
1123 newValue = MOTION_DETECT_SECTOR; |
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
|
1124 break; |
373
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
1125 case MOTION_DETECT_SECTOR: |
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
1126 newValue = MOTION_DETECT_SCROLL; |
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
|
1127 break; |
373
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
1128 case MOTION_DETECT_SCROLL: |
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
1129 newValue = MOTION_DETECT_OFF; |
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
1130 break; |
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
|
1131 default: |
373
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
1132 newValue = MOTION_DETECT_OFF; |
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
|
1133 break; |
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
|
1134 } |
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
|
1135 settingsGetPointer()->MotionDetection = newValue; |
373
7b981f8bdd41
Add scroll event by pitch angle detection:
ideenmodellierer
parents:
368
diff
changeset
|
1136 InitMotionDetection(); |
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
|
1137 return UNSPECIFIC_RETURN; |
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
|
1138 } |
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
|
1139 |
38 | 1140 void openEdit_Information(void) |
1141 { | |
1142 char text[70]; | |
1143 | |
1144 infoPage = 0; | |
1145 | |
1146 text[0] = '\001'; | |
1147 text[1] = TXT_Information; | |
1148 text[2] = 0; | |
1149 write_topline(text); | |
1150 | |
1151 text[0] = TXT_2BYTE; | |
1152 text[1] = TXT2BYTE_ButtonNext; | |
1153 text[2] = 0; | |
1154 | |
1155 write_field_button(StMSYS5_Info, 30, 800, ME_Y_LINE6, &FontT48, text); | |
1156 | |
1157 setEvent(StMSYS5_Info, (uint32_t)OnAction_Information); | |
1158 } | |
1159 | |
1160 | |
1161 uint8_t OnAction_Information (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1162 { | |
1163 resetEnterPressedToStateBeforeButtonAction(); | |
1164 | |
1165 infoPage++; | |
1166 if(infoPage > 3) | |
1167 return EXIT_TO_MENU; | |
1168 else | |
1169 return UNSPECIFIC_RETURN; | |
1170 } | |
1171 | |
1172 | |
1173 void refresh_InformationPage(void) | |
1174 { | |
1175 char text_header[5]; | |
1176 char text_button[5]; | |
1177 char text_content[256]; | |
1178 uint8_t date[3], year,month,day; | |
1179 | |
1180 RTC_DateTypeDef Sdate, Sdate2; | |
1181 float temperature1, temperature2, voltage, offsetTemperature; | |
1182 | |
1183 //RTC_TimeTypeDef Stime; | |
1184 | |
1185 /* | |
1186 SDeviceLine batteryChargeCycles; | |
1187 SDeviceLine batteryChargeCompleteCycles; | |
1188 SDeviceLine temperatureMinimum; | |
1189 SDeviceLine temperatureMaximum; | |
1190 SDeviceLine depthMaximum; | |
1191 SDeviceLine diveCycles; | |
1192 SDeviceLine voltageMinimum; | |
1193 */ | |
1194 | |
1195 switch(infoPage) | |
1196 { | |
1197 case 0: | |
1198 text_header[0] = '\001'; | |
1199 text_header[1] = TXT_Information; | |
1200 text_header[2] = 0; | |
1201 | |
1202 write_label_var( 20, 800, ME_Y_LINE1, &FontT42, "Dive Computer OSTC4"); | |
1203 write_label_var( 20, 800, ME_Y_LINE2, &FontT42, "Design heinrichs/weikamp"); | |
1204 | |
1205 Sdate.Year = firmwareDataGetPointer()->release_year; | |
1206 Sdate.Month = firmwareDataGetPointer()->release_month; | |
1207 Sdate.Date = firmwareDataGetPointer()->release_day; | |
1208 | |
1209 if(settingsGetPointer()->date_format == DDMMYY) | |
1210 { | |
1211 day = 0; | |
1212 month = 1; | |
1213 year = 2; | |
1214 } | |
1215 else | |
1216 if(settingsGetPointer()->date_format == MMDDYY) | |
1217 { | |
1218 day = 1; | |
1219 month = 0; | |
1220 year = 2; | |
1221 } | |
1222 else | |
1223 { | |
1224 day = 2; | |
1225 month = 1; | |
1226 year = 0; | |
1227 } | |
1228 date[day] = Sdate.Date; | |
1229 date[month] = Sdate.Month; | |
1230 date[year] = Sdate.Year; | |
1231 snprintf(text_content,40,"Firmware release date: %02d.%02d.%02d",date[0],date[1],date[2]); | |
1232 write_label_var( 20, 800, ME_Y_LINE3, &FontT42, text_content); | |
1233 write_label_var( 20, 800, ME_Y_LINE4, &FontT42, "for more information"); | |
64 | 1234 write_label_var( 20, 800, ME_Y_LINE5, &FontT42, "info@heinrichsweikamp.com"); |
38 | 1235 |
1236 text_button[0] = TXT_2BYTE; | |
1237 text_button[1] = TXT2BYTE_ButtonNext; | |
1238 text_button[2] = 0; | |
1239 break; | |
1240 | |
1241 case 1: | |
1242 text_header[0] = '\001'; | |
1243 text_header[1] = TXT_2BYTE; | |
1244 text_header[2] = TXT2BYTE_Usage_Battery; | |
1245 text_header[3] = 0; | |
1246 | |
1247 text_content[0] = TXT_2BYTE; | |
1248 text_content[1] = TXT2BYTE_ChargeCycles; | |
1249 text_content[2] = 0; | |
1250 write_label_var( 20, 800, ME_Y_LINE1, &FontT42, text_content); | |
57 | 1251 snprintf(text_content,80,"%ld (%ld)",stateDeviceGetPointer()->batteryChargeCycles.value_int32,stateDeviceGetPointer()->batteryChargeCompleteCycles.value_int32); |
38 | 1252 write_label_var( 20, 800, ME_Y_LINE2, &FontT42, text_content); |
1253 | |
1254 translateDate(stateDeviceGetPointer()->batteryChargeCycles.date_rtc_dr, &Sdate); | |
1255 translateDate(stateDeviceGetPointer()->batteryChargeCompleteCycles.date_rtc_dr, &Sdate2); | |
1256 snprintf(text_content,80,"%u.%u.20%02u (%u.%u.20%02u)",Sdate.Date,Sdate.Month,Sdate.Year, Sdate2.Date,Sdate2.Month,Sdate2.Year); | |
1257 write_label_var( 20, 800, ME_Y_LINE3, &FontT42, text_content); | |
1258 | |
1259 text_content[0] = TXT_2BYTE; | |
1260 text_content[1] = TXT2BYTE_LowestVoltage; | |
1261 text_content[2] = 0; | |
1262 write_label_var( 20, 800, ME_Y_LINE4, &FontT42, text_content); | |
1263 | |
1264 voltage = ((float)stateDeviceGetPointer()->voltageMinimum.value_int32) / 1000; | |
1265 snprintf(text_content,80,"%0.3fV (%u.%u.20%02u)",voltage, Sdate.Date,Sdate.Month,Sdate.Year); | |
1266 write_label_var( 20, 800, ME_Y_LINE5, &FontT42, text_content); | |
1267 | |
1268 text_button[0] = TXT_2BYTE; | |
1269 text_button[1] = TXT2BYTE_ButtonNext; | |
1270 text_button[2] = 0; | |
1271 break; | |
1272 | |
1273 case 2: | |
1274 text_header[0] = '\001'; | |
1275 text_header[1] = TXT_2BYTE; | |
1276 text_header[2] = TXT2BYTE_Usage_Dives; | |
1277 text_header[3] = 0; | |
1278 | |
1279 text_content[0] = TXT_2BYTE; | |
1280 text_content[1] = TXT2BYTE_NumberOfDives; | |
1281 text_content[2] = 0; | |
1282 write_label_var( 20, 800, ME_Y_LINE1, &FontT42, text_content); | |
1283 | |
57 | 1284 snprintf(text_content,80,"%ld (%ld)",stateDeviceGetPointer()->diveCycles.value_int32,(stateDeviceGetPointer()->depthMaximum.value_int32 - 1000) / 100); |
38 | 1285 write_label_var( 20, 800, ME_Y_LINE2, &FontT42, text_content); |
1286 | |
1287 translateDate(stateDeviceGetPointer()->diveCycles.date_rtc_dr, &Sdate); | |
1288 translateDate(stateDeviceGetPointer()->depthMaximum.date_rtc_dr, &Sdate2); | |
1289 snprintf(text_content,80,"%u.%u.20%02u (%u.%u.20%02u)",Sdate.Date,Sdate.Month,Sdate.Year, Sdate2.Date,Sdate2.Month,Sdate2.Year); | |
1290 write_label_var( 20, 800, ME_Y_LINE3, &FontT42, text_content); | |
1291 | |
1292 text_content[0] = TXT_2BYTE; | |
1293 text_content[1] = TXT2BYTE_HoursOfOperation; | |
1294 text_content[2] = 0; | |
1295 write_label_var( 20, 800, ME_Y_LINE4, &FontT42, text_content); | |
1296 | |
57 | 1297 snprintf(text_content,80,"%ld",(stateDeviceGetPointer()->hoursOfOperation.value_int32)/3600); |
38 | 1298 write_label_var( 20, 800, ME_Y_LINE5, &FontT42, text_content); |
1299 | |
1300 text_button[0] = TXT_2BYTE; | |
1301 text_button[1] = TXT2BYTE_ButtonNext; | |
1302 text_button[2] = 0; | |
1303 break; | |
1304 | |
1305 case 3: | |
1306 text_header[0] = '\001'; | |
1307 text_header[1] = TXT_2BYTE; | |
1308 text_header[2] = TXT2BYTE_Usage_Environment; | |
1309 text_header[3] = 0; | |
1310 | |
1311 text_content[0] = TXT_2BYTE; | |
1312 text_content[1] = TXT2BYTE_AmbientTemperature; | |
1313 text_content[2] = 0; | |
1314 write_label_var( 20, 800, ME_Y_LINE1, &FontT42, text_content); | |
1315 | |
1316 temperature1 = ((float)stateDeviceGetPointer()->temperatureMinimum.value_int32) / 100; | |
1317 temperature2 = ((float)stateDeviceGetPointer()->temperatureMaximum.value_int32) / 100; | |
1318 snprintf(text_content,80,"%0.2f\140C / %0.2f\140C",temperature1,temperature2); | |
1319 write_label_var( 20, 800, ME_Y_LINE2, &FontT42, text_content); | |
1320 | |
1321 translateDate(stateDeviceGetPointer()->temperatureMinimum.date_rtc_dr, &Sdate); | |
1322 translateDate(stateDeviceGetPointer()->temperatureMaximum.date_rtc_dr, &Sdate2); | |
1323 snprintf(text_content,80,"(%u.%u.20%02u / %u.%u.20%02u)",Sdate.Date,Sdate.Month,Sdate.Year, Sdate2.Date,Sdate2.Month,Sdate2.Year); | |
1324 write_label_var( 20, 800, ME_Y_LINE3, &FontT42, text_content); | |
1325 | |
1326 text_content[0] = TXT_2BYTE; | |
1327 text_content[1] = TXT2BYTE_Korrekturwerte; | |
1328 text_content[2] = 0; | |
1329 write_label_var( 20, 800, ME_Y_LINE4, &FontT42, text_content); | |
1330 | |
1331 offsetTemperature = ((float)settingsGetPointer()->offsetTemperature_centigrad) / 10; | |
103
f5d2f02dc73f
Generalize TEXT of pressure unit
Dmitry Romanov <kitt@bk.ru>
parents:
102
diff
changeset
|
1332 snprintf(text_content,80,"%i %s / %0.2f\140C",settingsGetPointer()->offsetPressure_mbar, TEXT_PRESSURE_UNIT, offsetTemperature); |
38 | 1333 write_label_var( 20, 800, ME_Y_LINE5, &FontT42, text_content); |
1334 | |
1335 text_button[0] = TXT_2BYTE; | |
1336 text_button[1] = TXT2BYTE_Exit; | |
1337 text_button[2] = 0; | |
1338 break; | |
1339 } | |
1340 | |
1341 write_topline(text_header); | |
1342 tMenuEdit_newButtonText(StMSYS5_Info, text_button); | |
1343 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonNext,0); | |
1344 } | |
1345 | |
1346 | |
1347 void openEdit_Reset(void) | |
1348 { | |
1349 char text[32]; | |
1350 | |
1351 text[0] = '\001'; | |
1352 text[1] = TXT_2BYTE; | |
1353 text[2] = TXT2BYTE_ResetMenu; | |
1354 text[3] = 0; | |
1355 write_topline(text); | |
1356 | |
1357 text[0] = TXT_2BYTE; | |
1358 text[1] = TXT2BYTE_LogbookOffset; | |
1359 text[7] = 0; | |
1360 | |
1361 write_label_var( 30, 400, ME_Y_LINE1, &FontT48, text); | |
1362 | |
1363 write_field_udigit(StMSYS6_LogbookOffset,420, 800, ME_Y_LINE1, &FontT48, "####", settingsGetPointer()->logbookOffset,0,0,0); | |
1364 | |
1365 text[0] = TXT_2BYTE; | |
1366 text[2] = 0; | |
1367 | |
1368 text[1] = TXT2BYTE_ResetAll; | |
1369 write_field_button(StMSYS6_ResetAll, 30, 800, ME_Y_LINE2, &FontT48, text); | |
1370 | |
1371 text[1] = TXT2BYTE_ResetDeco; | |
1372 write_field_button(StMSYS6_ResetDeco, 30, 800, ME_Y_LINE3, &FontT48, text); | |
1373 | |
1374 text[1] = TXT2BYTE_Reboot; | |
1375 write_field_button(StMSYS6_Reboot, 30, 800, ME_Y_LINE4, &FontT48, text); | |
1376 | |
1377 text[1] = TXT2BYTE_Maintenance; | |
1378 write_field_button(StMSYS6_Maintenance, 30, 800, ME_Y_LINE5, &FontT48, text); | |
1379 | |
1380 #ifndef RESETLOGBLOCK | |
1381 text[1] = TXT2BYTE_ResetLogbook; | |
1382 write_field_button(StMSYS6_ResetLogbook,30, 800, ME_Y_LINE6, &FontT48, text); | |
1383 #else | |
1384 text[0] = '\021'; | |
1385 text[1] = TXT_2BYTE; | |
1386 text[2] = TXT2BYTE_ResetLogbook; | |
1387 text[3] = 0; | |
1388 write_field_button(StMSYS6_ResetLogbook,30, 800, ME_Y_LINE6, &FontT48, text); | |
1389 text[0] = TXT_2BYTE; | |
1390 text[2] = 0; | |
1391 #endif | |
1392 | |
1393 setEvent(StMSYS6_LogbookOffset, (uint32_t)OnAction_LogbookOffset); | |
1394 setEvent(StMSYS6_ResetAll, (uint32_t)OnAction_Confirm); | |
1395 setEvent(StMSYS6_ResetDeco, (uint32_t)OnAction_Confirm); | |
1396 setEvent(StMSYS6_Reboot, (uint32_t)OnAction_Confirm); | |
1397 setEvent(StMSYS6_Maintenance, (uint32_t)OnAction_Confirm); | |
1398 #ifndef RESETLOGBLOCK | |
1399 setEvent(StMSYS6_ResetLogbook, (uint32_t)OnAction_Confirm); | |
1400 #else | |
1401 setEvent(StMSYS6_ResetLogbook, (uint32_t)OnAction_Nothing); | |
1402 #endif | |
1403 | |
1404 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); | |
1405 } | |
1406 | |
1407 | |
1408 void openEdit_ResetConfirmation(uint32_t editIdOfCaller) | |
1409 { | |
1410 char text[32]; | |
1411 | |
1412 resetMenuEdit(CLUT_MenuPageSystem); | |
1413 | |
1414 text[0] = '\001'; | |
1415 text[1] = TXT_2BYTE; | |
1416 text[2] = TXT2BYTE_AreYouSure; | |
1417 text[3] = 0; | |
1418 write_topline(text); | |
1419 | |
1420 text[0] = TXT_2BYTE; | |
1421 text[2] = 0; | |
1422 text[1] = TXT2BYTE_Abort; | |
1423 | |
1424 write_field_button(StMSYS6_Exit, 30, 800, ME_Y_LINE1, &FontT48, text); | |
1425 | |
1426 text[2] = 0; | |
1427 text[3] = 0; | |
1428 switch(editIdOfCaller) | |
1429 { | |
1430 case StMSYS6_Reboot: | |
1431 case StMSYS6_RebootRTE: | |
1432 case StMSYS6_RebootMainCPU: | |
1433 text[1] = TXT2BYTE_RebootMainCPU; | |
1434 write_field_button(StMSYS6_RebootMainCPU, 30, 800, ME_Y_LINE2, &FontT48, text); | |
1435 text[1] = TXT2BYTE_RebootRTE; | |
1436 write_field_button(StMSYS6_RebootRTE, 30, 800, ME_Y_LINE3, &FontT48, text); | |
1437 setEvent(StMSYS6_Exit, (uint32_t)OnAction_Exit); | |
1438 setEvent(StMSYS6_RebootMainCPU, (uint32_t)OnAction_RebootMainCPU); | |
1439 setEvent(StMSYS6_RebootRTE, (uint32_t)OnAction_RebootRTE); | |
1440 text[0] = '\025'; | |
1441 text[1] = TXT_2BYTE; | |
1442 text[2] = TXT2BYTE_DecoDataLost; | |
1443 text[3] = 0; | |
1444 write_label_var( 30, 800, ME_Y_LINE4, &FontT48, text); | |
1445 break; | |
1446 | |
1447 case StMSYS6_ResetDeco: | |
1448 text[1] = TXT2BYTE_ResetDeco; | |
1449 write_field_button(editIdOfCaller, 30, 800, ME_Y_LINE2, &FontT48, text); | |
1450 setEvent(StMSYS6_Exit, (uint32_t)OnAction_Exit); | |
1451 setEvent(editIdOfCaller, (uint32_t)OnAction_ResetDeco); | |
1452 text[0] = '\025'; | |
1453 text[1] = TXT_2BYTE; | |
1454 text[2] = TXT2BYTE_DecoDataLost; | |
1455 text[3] = 0; | |
1456 write_label_var( 30, 800, ME_Y_LINE4, &FontT48, text); | |
1457 break; | |
1458 | |
1459 case StMSYS6_ResetAll: | |
1460 text[1] = TXT2BYTE_ResetAll; | |
1461 write_field_button(editIdOfCaller, 30, 800, ME_Y_LINE2, &FontT48, text); | |
1462 setEvent(StMSYS6_Exit, (uint32_t)OnAction_Exit); | |
1463 setEvent(editIdOfCaller, (uint32_t)OnAction_ResetAll); | |
1464 break; | |
1465 | |
1466 case StMSYS6_ResetLogbook: | |
1467 text[1] = TXT2BYTE_ResetLogbook; | |
1468 write_field_button(editIdOfCaller, 30, 800, ME_Y_LINE2, &FontT48, text); | |
1469 setEvent(StMSYS6_Exit, (uint32_t)OnAction_Exit); | |
1470 setEvent(editIdOfCaller, (uint32_t)OnAction_ResetLogbook); | |
1471 break; | |
1472 | |
1473 case StMSYS6_Maintenance: | |
1474 case StMSYS6_SetBattCharge: | |
1475 text[0] = TXT_2BYTE; | |
1476 text[1] = TXT2BYTE_SetFactoryDefaults; | |
1477 text[2] = 0; | |
1478 write_field_button(StMSYS6_SetFactoryBC, 30, 800, ME_Y_LINE2, &FontT48, text); | |
1479 | |
1480 if(stateRealGetPointer()->lifeData.battery_charge == 0) | |
1481 { | |
1482 text[0] = TXT_2BYTE; | |
1483 text[1] = TXT2BYTE_SetBatteryCharge; | |
1484 text[2] = 0; | |
1485 snprintf(&text[2],10,": %u%%",settingsGetPointer()->lastKnownBatteryPercentage); | |
1486 write_field_button(StMSYS6_SetBattCharge, 30, 800, ME_Y_LINE3, &FontT48, text); | |
1487 | |
1488 setEvent(StMSYS6_Exit, (uint32_t)OnAction_Exit); | |
1489 setEvent(StMSYS6_SetFactoryBC, (uint32_t)OnAction_SetFactoryDefaults); | |
1490 setEvent(StMSYS6_SetBattCharge, (uint32_t)OnAction_SetBatteryCharge); | |
1491 } | |
1492 else | |
1493 { | |
1494 setEvent(StMSYS6_Exit, (uint32_t)OnAction_Exit); | |
1495 setEvent(StMSYS6_SetFactoryBC, (uint32_t)OnAction_SetFactoryDefaults); | |
1496 } | |
1497 // write_field_button(StMSYS6_ScreenTest, 30, 800, ME_Y_LINE3, &FontT48, "Screen Test"); | |
1498 // setEvent(StMSYS6_ScreenTest, (uint32_t)OnAction_ScreenTest); | |
1499 | |
1500 text[0] = TXT_2BYTE; | |
1501 text[1] = TXT2BYTE_WarnBatteryLow; | |
1502 text[2] = 0; | |
1503 snprintf(&text[2],10,": %01.2fV",stateRealGetPointer()->lifeData.battery_voltage); | |
1504 write_label_var( 30, 800, ME_Y_LINE4, &FontT42, text); | |
1505 | |
1506 snprintf(&text[0],30,"Code: %X",getLicence()); | |
1507 write_label_var( 30, 800, ME_Y_LINE6, &FontT42, text); | |
1508 break; | |
1509 | |
1510 } | |
1511 | |
1512 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); | |
1513 } | |
1514 | |
1515 uint8_t OnAction_LogbookOffset(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1516 { | |
1517 uint8_t digitContentNew; | |
1518 uint32_t newOffset; | |
1519 | |
1520 if(action == ACTION_BUTTON_ENTER) | |
1521 return digitContent; | |
1522 | |
1523 if(action == ACTION_BUTTON_ENTER_FINAL) | |
1524 { | |
1525 evaluateNewString(editId, &newOffset, 0, 0, 0); | |
1526 if(newOffset > 9000) | |
1527 newOffset = 0; | |
1528 tMenuEdit_newInput(editId, newOffset, 0, 0, 0); | |
1529 settingsGetPointer()->logbookOffset = (uint16_t)newOffset; | |
1530 return UPDATE_DIVESETTINGS; | |
1531 } | |
1532 | |
1533 if(action == ACTION_BUTTON_NEXT) | |
1534 { | |
1535 digitContentNew = digitContent + 1; | |
1536 if(digitContentNew > '9') | |
1537 digitContentNew = '0'; | |
1538 return digitContentNew; | |
1539 } | |
1540 | |
1541 if(action == ACTION_BUTTON_BACK) | |
1542 { | |
1543 digitContentNew = digitContent - 1; | |
1544 if(digitContentNew < '0') | |
1545 digitContentNew = '9'; | |
1546 return digitContentNew; | |
1547 } | |
1548 return UNSPECIFIC_RETURN; | |
1549 } | |
1550 | |
1551 uint8_t OnAction_Nothing (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1552 { | |
1553 return UNSPECIFIC_RETURN; | |
1554 } | |
1555 | |
1556 uint8_t OnAction_Exit (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1557 { | |
1558 return EXIT_TO_MENU; | |
1559 } | |
1560 uint8_t OnAction_Confirm (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1561 { | |
1562 openEdit_ResetConfirmation(editId); | |
1563 return UNSPECIFIC_RETURN; | |
1564 } | |
1565 | |
1566 uint8_t OnAction_RebootRTE (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1567 { | |
1568 MX_SmallCPU_Reset_To_Standard(); | |
1569 return EXIT_TO_MENU; | |
1570 } | |
1571 | |
1572 uint8_t OnAction_ResetDeco (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1573 { | |
1574 clearDeco(); | |
1575 return EXIT_TO_MENU; | |
1576 } | |
1577 | |
1578 uint8_t OnAction_ResetAll (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1579 { | |
1580 set_settings_to_Standard(); | |
1581 check_and_correct_settings(); | |
1582 | |
1583 return UPDATE_AND_EXIT_TO_HOME; | |
1584 } | |
1585 | |
1586 uint8_t OnAction_ResetLogbook (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1587 { | |
1588 write_label_var( 430, 740, 350, &FontT42, "Wait"); | |
1589 ext_flash_erase_logbook(); | |
1590 | |
1591 SSettings * pSettings = settingsGetPointer(); | |
1592 pSettings->lastDiveLogId = 255; | |
1593 pSettings->logFlashNextSampleStartAddress = 0; | |
1594 | |
1595 return EXIT_TO_MENU; | |
1596 } | |
1597 | |
1598 uint8_t OnAction_RebootMainCPU (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1599 { | |
1600 settingsGetPointer()->showDebugInfo = 0; | |
1601 extern uint8_t bootToBootloader; | |
1602 bootToBootloader = 1; | |
1603 return UNSPECIFIC_RETURN; | |
1604 } | |
1605 | |
1606 | |
1607 uint8_t OnAction_SetFactoryDefaults(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1608 { | |
1609 settingsWriteFactoryDefaults(settingsGetPointer()->ButtonResponsiveness[3], settingsGetPointer()->buttonBalance); | |
1610 return EXIT_TO_MENU; | |
1611 } | |
1612 | |
1613 | |
1614 uint8_t OnAction_SetBatteryCharge(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1615 { | |
1616 setBatteryPercentage(settingsGetPointer()->lastKnownBatteryPercentage); | |
1617 // setBatteryPercentage(100); | |
1618 return EXIT_TO_MENU; | |
1619 } | |
1620 | |
1621 #ifdef SCREENTEST | |
1622 uint8_t OnAction_ScreenTest (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1623 { | |
1624 static uint8_t FrameCount = 1; // 0 is invisible frame | |
1625 char text[5]; | |
1626 GFX_DrawCfgScreen tTestScreen; | |
1627 tTestScreen.FBStartAdress = 0; | |
1628 tTestScreen.ImageHeight = 480; | |
1629 tTestScreen.ImageWidth = 800; | |
1630 tTestScreen.LayerIndex = 1; | |
1631 | |
1632 set_globalState(StMSYS6_ScreenTest); | |
1633 tTestScreen.FBStartAdress = getFrameByNumber(FrameCount); | |
1634 if(tTestScreen.FBStartAdress == 0) | |
1635 { | |
1636 extern uint8_t bootToBootloader; | |
1637 bootToBootloader = 1; | |
1638 } | |
1639 GFX_fill_buffer(tTestScreen.FBStartAdress, 0xFF, FrameCount); | |
1640 snprintf(text,5,"%u",FrameCount); | |
1641 Gfx_write_label_var(&tTestScreen, 10,100,10,&FontT48,CLUT_Font027,text); | |
1642 GFX_SetFramesTopBottom(tTestScreen.FBStartAdress, NULL,480); | |
1643 FrameCount++; | |
1644 } | |
1645 #endif | |
1646 /* | |
1647 uint8_t OnAction_TestCLog (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1648 { | |
1649 write_label_var( 430, 740, 350, &FontT42, "Wait"); | |
1650 | |
1651 test_log_only(20, 5); | |
1652 test_log_only(30, 10); | |
1653 ext_flash_write_settings(); | |
1654 return EXIT_TO_MENU; | |
1655 } | |
1656 */ | |
1657 |