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