Mercurial > public > ostc4
annotate Discovery/Src/tInfoLog.c @ 452:b90ddf57f7f1 minor_improvments
Added compile variant enabling the reset of profile sample information:
In case the sample ring has an overrun prior to the header ring then header will point to no longer available sample locations causing problems when the no longer existing samples are read. To avoid this also in earlier versions a variant has been added which enables the user to reset the invalid sample information by selecting the problematic dive in the infolog menu and pressing the middle button.
Added function which confirms consistency of dive log settings:
Meaning last dive and dive header are valid at startup. Repair and find lastDiveID are only called in case a inconsistency is detected
author | ideenmodellierer |
---|---|
date | Tue, 24 Mar 2020 21:59:11 +0100 |
parents | f11f0bf6ef2d |
children | 4bd01f48c285 |
rev | line source |
---|---|
38 | 1 /////////////////////////////////////////////////////////////////////////////// |
2 /// -*- coding: UTF-8 -*- | |
3 /// | |
4 /// \file Discovery/Src/tInfoLog.c | |
5 /// \brief Main Template file for Menu Page Deco | |
6 /// \author heinrichs weikamp gmbh | |
7 /// \date 31-July-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 "tInfoLog.h" | |
31 | |
32 #include "gfx_fonts.h" | |
33 #include "logbook.h" | |
34 #include "show_logbook.h" | |
35 #include "tHome.h" | |
36 #include "tInfo.h" | |
37 #include "tMenu.h" | |
38 #include "unit.h" | |
452
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
39 #include "externLogbookFlash.h" |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
40 #include "configuration.h" |
38 | 41 |
42 /* Exported variables --------------------------------------------------------*/ | |
43 | |
44 /* Private types -------------------------------------------------------------*/ | |
45 typedef struct | |
46 { | |
47 uint8_t page; | |
48 uint8_t line; | |
49 uint8_t linesAvailableForPage; | |
50 uint8_t modeFlipPages; | |
51 uint8_t maxpages; | |
52 } SInfoLogMemory; | |
53 | |
54 /* Private variables ---------------------------------------------------------*/ | |
55 GFX_DrawCfgScreen INFOLOGscreen; | |
56 GFX_DrawCfgScreen *pMenuCursor, *pMenuCursorDesignSolo; | |
57 GFX_DrawCfgWindow INFOLOGwindow; | |
58 | |
59 SInfoLogMemory infolog; | |
60 | |
61 /* Private function prototypes -----------------------------------------------*/ | |
62 void tInfoLog_BuildAndShowNextPage(void); | |
63 void tInfoLog_nextLine(void); | |
64 void showLog(void); | |
65 void showNextLogPage(void); | |
66 void stepBackInfo(void); | |
67 void stepForwardInfo(void); | |
68 void showLogExit(void); | |
452
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
69 void resetDiveProfile(void); |
38 | 70 |
71 /* Exported functions --------------------------------------------------------*/ | |
72 void tInfoLog_init(void) | |
73 { | |
74 INFOLOGscreen.FBStartAdress = 0; | |
75 INFOLOGscreen.ImageHeight = 480; | |
76 INFOLOGscreen.ImageWidth = 800; | |
77 INFOLOGscreen.LayerIndex = 1; | |
78 | |
79 INFOLOGwindow.Image = &INFOLOGscreen; | |
80 INFOLOGwindow.WindowNumberOfTextLines = 6; | |
81 INFOLOGwindow.WindowLineSpacing = 65; | |
82 INFOLOGwindow.WindowTab = 400; | |
83 INFOLOGwindow.WindowX0 = 20; | |
84 INFOLOGwindow.WindowX1 = 779; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
85 if(!settingsGetPointer()->FlipDisplay) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
86 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
87 INFOLOGwindow.WindowY0 = 4 + 25; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
88 INFOLOGwindow.WindowY1 = 390 + 25; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
89 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
90 else |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
91 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
92 INFOLOGwindow.WindowY0 = 479 - 390; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
93 INFOLOGwindow.WindowY1 = 479 - 25; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
94 } |
38 | 95 } |
96 | |
97 | |
98 void openInfoLogLastDive(void) | |
99 { | |
100 infolog.page = 0; | |
101 SLogbookHeader logbookHeader; | |
102 if(logbook_getHeader(0,&logbookHeader)) | |
103 { | |
104 set_globalState(StILOGSHOW); // all the rest with zeros | |
105 infolog.page = 1; | |
106 infolog.line = 1; | |
107 show_logbook_test(1, 0); | |
108 } | |
109 else | |
110 openLog(0); | |
111 } | |
112 | |
113 | |
114 void openLog(_Bool recallKeepPage) | |
115 { | |
116 if(recallKeepPage && infolog.page) | |
117 infolog.page--; | |
118 else | |
119 infolog.page = 0; | |
120 | |
121 infolog.modeFlipPages = 1; | |
122 set_globalState_Log_Page(infolog.page); | |
123 infolog.maxpages = (logbook_getNumberOfHeaders() + 5) / 6; | |
124 tInfoLog_BuildAndShowNextPage(); | |
125 | |
126 pMenuCursor = get_PointerMenuCursorScreen(); | |
127 pMenuCursorDesignSolo = get_PointerMenuCursorDesignSoloScreen(); | |
128 | |
129 change_CLUT_entry(CLUT_MenuLineSelectedSides, CLUT_InfoPageLogbook); | |
130 change_CLUT_entry(CLUT_MenuLineSelectedSeperator, CLUT_InfoPageLogbook); | |
131 | |
132 //GFX_ResetLayer(TOP_LAYER); | |
133 //GFX_ResetLayer(BACKGRD_LAYER); | |
134 | |
135 if(infolog.page == 255) | |
136 GFX_SetFrameBottom((INFOLOGscreen.FBStartAdress), 0, 0, 800, 480); | |
137 else | |
138 { | |
139 // very old: GFX_SetFrameBottom((pMenuCursor->FBStartAdress), 0, 0, 800, 390); | |
140 // no, set cursor to firt line instead with tInfoLog_nextLine() GFX_SetFrameBottom((pMenuCursorDesignSolo->FBStartAdress), 0, 25, 800, 390); | |
141 tInfoLog_nextLine(); | |
142 } | |
143 } | |
144 | |
145 | |
146 void sendActionToInfoLogList(uint8_t sendAction) | |
147 { | |
148 switch(sendAction) | |
149 { | |
150 case ACTION_BUTTON_ENTER: | |
151 stepForwardInfo(); | |
152 break; | |
153 case ACTION_BUTTON_NEXT: | |
154 | |
155 if(infolog.modeFlipPages) | |
156 { | |
157 tInfoLog_BuildAndShowNextPage(); | |
158 // GFX_SetFrameBottom((pMenuCursor->FBStartAdress), 0, 25, 800, 390); | |
159 } | |
160 else | |
161 tInfoLog_nextLine(); | |
162 break; | |
163 case ACTION_TIMEOUT: | |
164 case ACTION_MODE_CHANGE: | |
165 case ACTION_BUTTON_BACK: | |
166 stepBackInfo(); | |
186
f11f0bf6ef2d
cleanup: remove obsolete code, make static, etc.
Jan Mulder <jlmulder@xs4all.nl>
parents:
110
diff
changeset
|
167 break; |
38 | 168 default: |
169 break; | |
170 case ACTION_IDLE_TICK: | |
171 case ACTION_IDLE_SECOND: | |
172 break; | |
173 } | |
174 } | |
175 | |
176 | |
177 void sendActionToInfoLogShow(uint8_t sendAction) | |
178 { | |
179 switch(sendAction) | |
180 { | |
181 case ACTION_BUTTON_ENTER: | |
452
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
182 #ifdef ENABLE_PROFILE_RESET |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
183 resetDiveProfile(); |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
184 #endif |
38 | 185 break; |
186 case ACTION_BUTTON_NEXT: | |
187 showNextLogPage(); | |
188 break; | |
189 case ACTION_TIMEOUT: | |
190 case ACTION_MODE_CHANGE: | |
191 case ACTION_BUTTON_BACK: | |
192 if(get_globalState() == StILOGSHOW) // no page nor line | |
193 { | |
194 openLog(1); | |
195 } | |
196 else | |
197 { | |
198 showLogExit(); | |
199 } | |
200 show_logbook_exit(); | |
186
f11f0bf6ef2d
cleanup: remove obsolete code, make static, etc.
Jan Mulder <jlmulder@xs4all.nl>
parents:
110
diff
changeset
|
201 break; |
38 | 202 default: |
203 break; | |
204 case ACTION_IDLE_TICK: | |
205 case ACTION_IDLE_SECOND: | |
206 break; | |
207 } | |
208 } | |
209 | |
210 | |
211 /* Private functions ---------------------------------------------------------*/ | |
212 | |
213 void exitLog(void) | |
214 { | |
215 //set_globalState_tHome(); | |
216 exitInfo(); | |
217 releaseFrame(15,INFOLOGscreen.FBStartAdress); | |
218 } | |
219 | |
220 | |
221 void stepBackInfo(void) | |
222 { | |
223 if(infolog.modeFlipPages == 0) | |
224 { | |
225 infolog.line = 0; | |
226 infolog.modeFlipPages = 1; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
227 |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
228 if(!settingsGetPointer()->FlipDisplay) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
229 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
230 GFX_SetFrameBottom(pMenuCursorDesignSolo->FBStartAdress, 0, 25, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
231 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
232 else |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
233 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
234 GFX_SetFrameBottom(pMenuCursorDesignSolo->FBStartAdress, 0, 65, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
235 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
236 |
38 | 237 } |
238 else | |
239 exitLog(); | |
240 } | |
241 | |
242 | |
243 void stepForwardInfo(void) | |
244 { | |
245 if(infolog.modeFlipPages == 1) | |
246 { | |
247 tInfoLog_nextLine(); | |
248 } | |
249 else | |
250 showLog(); | |
251 } | |
252 | |
253 | |
254 void tInfoLog_BuildAndShowNextPage(void) | |
255 { | |
256 char text[MAX_PAGE_TEXTSIZE]; | |
257 uint16_t textPointer = 0; | |
258 SLogbookHeader logbookHeader; | |
259 // uint16_t divetime = logbookHeader.diveTimeMinutes; | |
260 // uint16_t maxDepth = logbookHeader.maxDepth/100; | |
261 int i = 0; | |
262 uint8_t date[2], month,day; | |
263 | |
264 if(INFOLOGscreen.FBStartAdress) | |
265 releaseFrame(15,INFOLOGscreen.FBStartAdress); | |
266 INFOLOGscreen.FBStartAdress = getFrame(15); | |
267 | |
268 infolog.page += 1; | |
269 infolog.linesAvailableForPage = 0; | |
270 | |
271 if((infolog.page < 1) || (infolog.page > 43)) /* max with 256 entries */ | |
272 infolog.page = 1; | |
273 | |
274 | |
275 text[0] = '\001'; | |
276 text[1] = TXT_Logbook; | |
277 text[2] = 0; | |
278 gfx_write_topline_simple(&INFOLOGscreen, text, CLUT_InfoPageLogbook); | |
279 | |
280 *text = 0; | |
281 if(!logbook_getHeader((infolog.page - 1) * 6,&logbookHeader)) | |
282 { | |
283 infolog.page = 1; | |
284 if(!logbook_getHeader((infolog.page - 1) * 6,&logbookHeader)) | |
285 { | |
286 infolog.page = 255; | |
287 infolog.linesAvailableForPage = 0; | |
288 text[0] = TXT_LogbookEmpty; | |
289 text[1] = 0; | |
290 } | |
291 } | |
292 | |
293 if((*text == 0) && (infolog.maxpages > 1)) | |
294 { | |
295 snprintf(text,8, "\002" "%u/%u", infolog.page, infolog.maxpages); | |
296 gfx_write_topline_simple(&INFOLOGscreen, text, CLUT_InfoPageLogbook); | |
297 *text = 0; | |
298 } | |
299 | |
300 if(*text == 0) | |
301 { | |
302 infolog.line = 0; | |
303 textPointer = 0; | |
304 if(settingsGetPointer()->date_format == DDMMYY) | |
305 { | |
306 day = 0; | |
307 month = 1; | |
308 } | |
309 else | |
310 { | |
311 day = 1; | |
312 month = 0; | |
313 } | |
314 for(i = 0; i < 6; i++) | |
315 { | |
316 if(i) | |
317 { | |
318 if(!logbook_getHeader(((infolog.page - 1) * 6) + i, &logbookHeader)) | |
319 break; | |
320 } | |
321 infolog.linesAvailableForPage += 1; | |
322 uint16_t divetime = logbookHeader.diveTimeMinutes; | |
323 uint16_t maxDepthMeter = logbookHeader.maxDepth/100; | |
324 uint16_t maxDepthSubmeter = (logbookHeader.maxDepth - maxDepthMeter * 100)/10; | |
325 uint16_t number = ((infolog.page - 1) * 6) + i + 1; | |
326 if(settingsGetPointer()->logbookOffset) | |
327 { | |
328 if(number <= settingsGetPointer()->logbookOffset) | |
329 number = settingsGetPointer()->logbookOffset + 1 - number; | |
330 } | |
331 date[day] = logbookHeader.dateDay; | |
332 date[month] = logbookHeader.dateMonth; | |
333 | |
334 text[textPointer++] = '\034';// monospaced space large size mode | |
335 textPointer += snprintf(&text[textPointer], 20,"\021%04u \020", number); | |
336 /* if(number < 1000) | |
337 textPointer += snprintf(&text[textPointer], 20,"\021%2u \020", number); | |
338 else | |
339 textPointer += snprintf(&text[textPointer], 20,"\021\016\016%3u \017\020", number); | |
340 */ | |
341 textPointer += snprintf(&text[textPointer], 20,"%02d.%02d ",date[0],date[1]); | |
342 textPointer += snprintf(&text[textPointer], 20,"%02d:%02d ",logbookHeader.timeHour,logbookHeader.timeMinute); | |
343 switch(logbookHeader.decoModel) | |
344 { | |
345 case 1: | |
346 textPointer += snprintf(&text[textPointer],20,"\016\016 GF \017"); | |
347 break; | |
348 case 2: | |
349 textPointer += snprintf(&text[textPointer],20,"\016\016 VPM \017"); | |
350 break; | |
351 default: | |
352 textPointer += snprintf(&text[textPointer],20,"\016\016 * \017"); | |
353 break; | |
354 } | |
355 | |
356 if(settingsGetPointer()->nonMetricalSystem) | |
357 { | |
358 float maxDepthFeet = 0; | |
359 maxDepthFeet = unit_depth_float(((float)logbookHeader.maxDepth)/100); | |
360 textPointer += snprintf(&text[textPointer], 20,"%3.0f\016\016ft\017 ", maxDepthFeet); | |
361 } | |
362 else | |
363 { | |
364 textPointer += snprintf(&text[textPointer], 20,"%3d.%d\016\016m\017 ", maxDepthMeter,maxDepthSubmeter); | |
365 } | |
366 textPointer += snprintf(&text[textPointer], 20,"%3d'\n\r", divetime); | |
367 } | |
368 } | |
369 GFX_write_string(&FontT48, &INFOLOGwindow, text,1); | |
370 | |
371 if(infolog.linesAvailableForPage > 1) | |
372 tInfo_write_buttonTextline(&INFOLOGscreen, TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); | |
373 else if(infolog.page == 255) | |
374 tInfo_write_buttonTextline(&INFOLOGscreen, TXT2BYTE_ButtonBack,0,0); | |
375 else | |
376 tInfo_write_buttonTextline(&INFOLOGscreen, TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,0); | |
377 | |
378 GFX_SetFrameTop(INFOLOGscreen.FBStartAdress); | |
379 set_globalState_Log_Page(infolog.page); | |
380 } | |
381 | |
382 | |
383 void tInfoLog_nextLine(void) | |
384 { | |
385 if(infolog.linesAvailableForPage == 0) | |
386 return; | |
387 | |
388 infolog.line += 1; | |
389 if(infolog.line > infolog.linesAvailableForPage) | |
390 infolog.line = 1; | |
391 | |
392 infolog.modeFlipPages = 0; | |
393 | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
394 if(!settingsGetPointer()->FlipDisplay) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
395 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
396 GFX_SetFrameBottom((pMenuCursor->FBStartAdress) + 65*2*(infolog.line - 1), 0, 25, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
397 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
398 else |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
399 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
400 GFX_SetFrameBottom((pMenuCursor->FBStartAdress)+ (390 - 65 *(infolog.line)) *2, 0, 480-390-25, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
401 } |
38 | 402 } |
403 | |
404 | |
405 void showLogExit(void) | |
406 { | |
407 GFX_SetFrameTop(INFOLOGscreen.FBStartAdress); | |
408 GFX_SetFrameBottom((pMenuCursor->FBStartAdress) + 65*2*(infolog.line - 1), 0, 25, 800, 390); | |
409 set_globalState_Log_Page(infolog.page); | |
410 } | |
411 | |
412 | |
413 void showLog(void) | |
414 { | |
415 uint8_t stepBack; | |
416 | |
417 if(infolog.page == 255) | |
418 return; | |
419 | |
420 stepBack = (6 * (infolog.page - 1)) + infolog.line - 1; | |
421 //build_logbook_test(); | |
422 show_logbook_test(1, stepBack); | |
423 } | |
424 | |
425 | |
426 void showNextLogPage(void) | |
427 { | |
428 uint8_t stepBack; | |
429 | |
430 if(infolog.page == 255) | |
431 return; | |
432 | |
433 stepBack = (6 * (infolog.page - 1)) + infolog.line - 1; | |
434 //build_logbook_test(); | |
435 show_logbook_test(0, stepBack); | |
436 } | |
437 | |
452
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
438 #ifdef ENABLE_PROFILE_RESET |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
439 void resetDiveProfile() |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
440 { |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
441 uint8_t stepBack; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
442 SLogbookHeader logbookHeader; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
443 convert_Type dataStart; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
444 stepBack = (6 * (infolog.page - 1)) + infolog.line - 1; /* calculate current dive ID */ |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
445 logbook_getHeader(stepBack ,&logbookHeader); |
38 | 446 |
452
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
447 dataStart.u8bit.byteHigh = 0; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
448 dataStart.u8bit.byteLow = logbookHeader.pBeginProfileData[0]; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
449 dataStart.u8bit.byteMidLow = logbookHeader.pBeginProfileData[1]; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
450 dataStart.u8bit.byteMidHigh = logbookHeader.pBeginProfileData[2]; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
451 |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
452 dataStart.u32bit &= 0xFFFF0000; /* set to sector start */ |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
453 ext_flash_invalidate_sample_index(dataStart.u32bit); |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
454 } |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
455 #endif |