Mercurial > public > ostc4
annotate Discovery/Src/tInfoLog.c @ 458:5dd996ed8611 minor_improvments
Added ppO2 to dummy profile data:
PPO2 calculation based on the first gas has been added to the dummy profile to enable drawing of the graph at log page four
As this increased the number of parameters to be passed to the sub functions, the complete dive header is passed as reference instead of single members to increase the code maintanability
author | ideenmodellierer |
---|---|
date | Sat, 28 Mar 2020 21:41:47 +0100 |
parents | 4bd01f48c285 |
children | 04d94851cd1b |
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); | |
457 | 69 #ifdef ENABLE_PROFILE_RESET |
452
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
70 void resetDiveProfile(void); |
457 | 71 #endif |
38 | 72 |
73 /* Exported functions --------------------------------------------------------*/ | |
74 void tInfoLog_init(void) | |
75 { | |
76 INFOLOGscreen.FBStartAdress = 0; | |
77 INFOLOGscreen.ImageHeight = 480; | |
78 INFOLOGscreen.ImageWidth = 800; | |
79 INFOLOGscreen.LayerIndex = 1; | |
80 | |
81 INFOLOGwindow.Image = &INFOLOGscreen; | |
82 INFOLOGwindow.WindowNumberOfTextLines = 6; | |
83 INFOLOGwindow.WindowLineSpacing = 65; | |
84 INFOLOGwindow.WindowTab = 400; | |
85 INFOLOGwindow.WindowX0 = 20; | |
86 INFOLOGwindow.WindowX1 = 779; | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
87 if(!settingsGetPointer()->FlipDisplay) |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
88 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
89 INFOLOGwindow.WindowY0 = 4 + 25; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
90 INFOLOGwindow.WindowY1 = 390 + 25; |
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 else |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
93 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
94 INFOLOGwindow.WindowY0 = 479 - 390; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
95 INFOLOGwindow.WindowY1 = 479 - 25; |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
96 } |
38 | 97 } |
98 | |
99 | |
100 void openInfoLogLastDive(void) | |
101 { | |
102 infolog.page = 0; | |
103 SLogbookHeader logbookHeader; | |
104 if(logbook_getHeader(0,&logbookHeader)) | |
105 { | |
106 set_globalState(StILOGSHOW); // all the rest with zeros | |
107 infolog.page = 1; | |
108 infolog.line = 1; | |
109 show_logbook_test(1, 0); | |
110 } | |
111 else | |
112 openLog(0); | |
113 } | |
114 | |
115 | |
116 void openLog(_Bool recallKeepPage) | |
117 { | |
118 if(recallKeepPage && infolog.page) | |
119 infolog.page--; | |
120 else | |
121 infolog.page = 0; | |
122 | |
123 infolog.modeFlipPages = 1; | |
124 set_globalState_Log_Page(infolog.page); | |
125 infolog.maxpages = (logbook_getNumberOfHeaders() + 5) / 6; | |
126 tInfoLog_BuildAndShowNextPage(); | |
127 | |
128 pMenuCursor = get_PointerMenuCursorScreen(); | |
129 pMenuCursorDesignSolo = get_PointerMenuCursorDesignSoloScreen(); | |
130 | |
131 change_CLUT_entry(CLUT_MenuLineSelectedSides, CLUT_InfoPageLogbook); | |
132 change_CLUT_entry(CLUT_MenuLineSelectedSeperator, CLUT_InfoPageLogbook); | |
133 | |
134 //GFX_ResetLayer(TOP_LAYER); | |
135 //GFX_ResetLayer(BACKGRD_LAYER); | |
136 | |
137 if(infolog.page == 255) | |
138 GFX_SetFrameBottom((INFOLOGscreen.FBStartAdress), 0, 0, 800, 480); | |
139 else | |
140 { | |
141 // very old: GFX_SetFrameBottom((pMenuCursor->FBStartAdress), 0, 0, 800, 390); | |
142 // no, set cursor to firt line instead with tInfoLog_nextLine() GFX_SetFrameBottom((pMenuCursorDesignSolo->FBStartAdress), 0, 25, 800, 390); | |
143 tInfoLog_nextLine(); | |
144 } | |
145 } | |
146 | |
147 | |
148 void sendActionToInfoLogList(uint8_t sendAction) | |
149 { | |
150 switch(sendAction) | |
151 { | |
152 case ACTION_BUTTON_ENTER: | |
153 stepForwardInfo(); | |
154 break; | |
155 case ACTION_BUTTON_NEXT: | |
156 | |
157 if(infolog.modeFlipPages) | |
158 { | |
159 tInfoLog_BuildAndShowNextPage(); | |
160 // GFX_SetFrameBottom((pMenuCursor->FBStartAdress), 0, 25, 800, 390); | |
161 } | |
162 else | |
163 tInfoLog_nextLine(); | |
164 break; | |
165 case ACTION_TIMEOUT: | |
166 case ACTION_MODE_CHANGE: | |
167 case ACTION_BUTTON_BACK: | |
168 stepBackInfo(); | |
186
f11f0bf6ef2d
cleanup: remove obsolete code, make static, etc.
Jan Mulder <jlmulder@xs4all.nl>
parents:
110
diff
changeset
|
169 break; |
38 | 170 default: |
171 break; | |
172 case ACTION_IDLE_TICK: | |
173 case ACTION_IDLE_SECOND: | |
174 break; | |
175 } | |
176 } | |
177 | |
178 | |
179 void sendActionToInfoLogShow(uint8_t sendAction) | |
180 { | |
181 switch(sendAction) | |
182 { | |
183 case ACTION_BUTTON_ENTER: | |
452
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
184 #ifdef ENABLE_PROFILE_RESET |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
185 resetDiveProfile(); |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
186 #endif |
38 | 187 break; |
188 case ACTION_BUTTON_NEXT: | |
189 showNextLogPage(); | |
190 break; | |
191 case ACTION_TIMEOUT: | |
192 case ACTION_MODE_CHANGE: | |
193 case ACTION_BUTTON_BACK: | |
194 if(get_globalState() == StILOGSHOW) // no page nor line | |
195 { | |
196 openLog(1); | |
197 } | |
198 else | |
199 { | |
200 showLogExit(); | |
201 } | |
202 show_logbook_exit(); | |
186
f11f0bf6ef2d
cleanup: remove obsolete code, make static, etc.
Jan Mulder <jlmulder@xs4all.nl>
parents:
110
diff
changeset
|
203 break; |
38 | 204 default: |
205 break; | |
206 case ACTION_IDLE_TICK: | |
207 case ACTION_IDLE_SECOND: | |
208 break; | |
209 } | |
210 } | |
211 | |
212 | |
213 /* Private functions ---------------------------------------------------------*/ | |
214 | |
215 void exitLog(void) | |
216 { | |
217 //set_globalState_tHome(); | |
218 exitInfo(); | |
219 releaseFrame(15,INFOLOGscreen.FBStartAdress); | |
220 } | |
221 | |
222 | |
223 void stepBackInfo(void) | |
224 { | |
225 if(infolog.modeFlipPages == 0) | |
226 { | |
227 infolog.line = 0; | |
228 infolog.modeFlipPages = 1; | |
110
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 if(!settingsGetPointer()->FlipDisplay) |
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 GFX_SetFrameBottom(pMenuCursorDesignSolo->FBStartAdress, 0, 25, 800, 390); |
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 else |
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 GFX_SetFrameBottom(pMenuCursorDesignSolo->FBStartAdress, 0, 65, 800, 390); |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
237 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
238 |
38 | 239 } |
240 else | |
241 exitLog(); | |
242 } | |
243 | |
244 | |
245 void stepForwardInfo(void) | |
246 { | |
247 if(infolog.modeFlipPages == 1) | |
248 { | |
249 tInfoLog_nextLine(); | |
250 } | |
251 else | |
252 showLog(); | |
253 } | |
254 | |
255 | |
256 void tInfoLog_BuildAndShowNextPage(void) | |
257 { | |
258 char text[MAX_PAGE_TEXTSIZE]; | |
259 uint16_t textPointer = 0; | |
260 SLogbookHeader logbookHeader; | |
261 // uint16_t divetime = logbookHeader.diveTimeMinutes; | |
262 // uint16_t maxDepth = logbookHeader.maxDepth/100; | |
263 int i = 0; | |
264 uint8_t date[2], month,day; | |
265 | |
266 if(INFOLOGscreen.FBStartAdress) | |
267 releaseFrame(15,INFOLOGscreen.FBStartAdress); | |
268 INFOLOGscreen.FBStartAdress = getFrame(15); | |
269 | |
270 infolog.page += 1; | |
271 infolog.linesAvailableForPage = 0; | |
272 | |
273 if((infolog.page < 1) || (infolog.page > 43)) /* max with 256 entries */ | |
274 infolog.page = 1; | |
275 | |
276 | |
277 text[0] = '\001'; | |
278 text[1] = TXT_Logbook; | |
279 text[2] = 0; | |
280 gfx_write_topline_simple(&INFOLOGscreen, text, CLUT_InfoPageLogbook); | |
281 | |
282 *text = 0; | |
283 if(!logbook_getHeader((infolog.page - 1) * 6,&logbookHeader)) | |
284 { | |
285 infolog.page = 1; | |
286 if(!logbook_getHeader((infolog.page - 1) * 6,&logbookHeader)) | |
287 { | |
288 infolog.page = 255; | |
289 infolog.linesAvailableForPage = 0; | |
290 text[0] = TXT_LogbookEmpty; | |
291 text[1] = 0; | |
292 } | |
293 } | |
294 | |
295 if((*text == 0) && (infolog.maxpages > 1)) | |
296 { | |
297 snprintf(text,8, "\002" "%u/%u", infolog.page, infolog.maxpages); | |
298 gfx_write_topline_simple(&INFOLOGscreen, text, CLUT_InfoPageLogbook); | |
299 *text = 0; | |
300 } | |
301 | |
302 if(*text == 0) | |
303 { | |
304 infolog.line = 0; | |
305 textPointer = 0; | |
306 if(settingsGetPointer()->date_format == DDMMYY) | |
307 { | |
308 day = 0; | |
309 month = 1; | |
310 } | |
311 else | |
312 { | |
313 day = 1; | |
314 month = 0; | |
315 } | |
316 for(i = 0; i < 6; i++) | |
317 { | |
318 if(i) | |
319 { | |
320 if(!logbook_getHeader(((infolog.page - 1) * 6) + i, &logbookHeader)) | |
321 break; | |
322 } | |
323 infolog.linesAvailableForPage += 1; | |
324 uint16_t divetime = logbookHeader.diveTimeMinutes; | |
325 uint16_t maxDepthMeter = logbookHeader.maxDepth/100; | |
326 uint16_t maxDepthSubmeter = (logbookHeader.maxDepth - maxDepthMeter * 100)/10; | |
327 uint16_t number = ((infolog.page - 1) * 6) + i + 1; | |
328 if(settingsGetPointer()->logbookOffset) | |
329 { | |
330 if(number <= settingsGetPointer()->logbookOffset) | |
331 number = settingsGetPointer()->logbookOffset + 1 - number; | |
332 } | |
333 date[day] = logbookHeader.dateDay; | |
334 date[month] = logbookHeader.dateMonth; | |
335 | |
336 text[textPointer++] = '\034';// monospaced space large size mode | |
337 textPointer += snprintf(&text[textPointer], 20,"\021%04u \020", number); | |
338 /* if(number < 1000) | |
339 textPointer += snprintf(&text[textPointer], 20,"\021%2u \020", number); | |
340 else | |
341 textPointer += snprintf(&text[textPointer], 20,"\021\016\016%3u \017\020", number); | |
342 */ | |
343 textPointer += snprintf(&text[textPointer], 20,"%02d.%02d ",date[0],date[1]); | |
344 textPointer += snprintf(&text[textPointer], 20,"%02d:%02d ",logbookHeader.timeHour,logbookHeader.timeMinute); | |
345 switch(logbookHeader.decoModel) | |
346 { | |
347 case 1: | |
348 textPointer += snprintf(&text[textPointer],20,"\016\016 GF \017"); | |
349 break; | |
350 case 2: | |
351 textPointer += snprintf(&text[textPointer],20,"\016\016 VPM \017"); | |
352 break; | |
353 default: | |
354 textPointer += snprintf(&text[textPointer],20,"\016\016 * \017"); | |
355 break; | |
356 } | |
357 | |
358 if(settingsGetPointer()->nonMetricalSystem) | |
359 { | |
360 float maxDepthFeet = 0; | |
361 maxDepthFeet = unit_depth_float(((float)logbookHeader.maxDepth)/100); | |
362 textPointer += snprintf(&text[textPointer], 20,"%3.0f\016\016ft\017 ", maxDepthFeet); | |
363 } | |
364 else | |
365 { | |
366 textPointer += snprintf(&text[textPointer], 20,"%3d.%d\016\016m\017 ", maxDepthMeter,maxDepthSubmeter); | |
367 } | |
368 textPointer += snprintf(&text[textPointer], 20,"%3d'\n\r", divetime); | |
369 } | |
370 } | |
371 GFX_write_string(&FontT48, &INFOLOGwindow, text,1); | |
372 | |
373 if(infolog.linesAvailableForPage > 1) | |
374 tInfo_write_buttonTextline(&INFOLOGscreen, TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); | |
375 else if(infolog.page == 255) | |
376 tInfo_write_buttonTextline(&INFOLOGscreen, TXT2BYTE_ButtonBack,0,0); | |
377 else | |
378 tInfo_write_buttonTextline(&INFOLOGscreen, TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,0); | |
379 | |
380 GFX_SetFrameTop(INFOLOGscreen.FBStartAdress); | |
381 set_globalState_Log_Page(infolog.page); | |
382 } | |
383 | |
384 | |
385 void tInfoLog_nextLine(void) | |
386 { | |
387 if(infolog.linesAvailableForPage == 0) | |
388 return; | |
389 | |
390 infolog.line += 1; | |
391 if(infolog.line > infolog.linesAvailableForPage) | |
392 infolog.line = 1; | |
393 | |
394 infolog.modeFlipPages = 0; | |
395 | |
110
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
396 if(!settingsGetPointer()->FlipDisplay) |
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 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
|
399 } |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
400 else |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
401 { |
cc8e24374b83
Added option to handled mirrored display to existing functions
Ideenmodellierer
parents:
38
diff
changeset
|
402 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
|
403 } |
38 | 404 } |
405 | |
406 | |
407 void showLogExit(void) | |
408 { | |
409 GFX_SetFrameTop(INFOLOGscreen.FBStartAdress); | |
410 GFX_SetFrameBottom((pMenuCursor->FBStartAdress) + 65*2*(infolog.line - 1), 0, 25, 800, 390); | |
411 set_globalState_Log_Page(infolog.page); | |
412 } | |
413 | |
414 | |
415 void showLog(void) | |
416 { | |
417 uint8_t stepBack; | |
418 | |
419 if(infolog.page == 255) | |
420 return; | |
421 | |
422 stepBack = (6 * (infolog.page - 1)) + infolog.line - 1; | |
423 //build_logbook_test(); | |
424 show_logbook_test(1, stepBack); | |
425 } | |
426 | |
427 | |
428 void showNextLogPage(void) | |
429 { | |
430 uint8_t stepBack; | |
431 | |
432 if(infolog.page == 255) | |
433 return; | |
434 | |
435 stepBack = (6 * (infolog.page - 1)) + infolog.line - 1; | |
436 //build_logbook_test(); | |
437 show_logbook_test(0, stepBack); | |
438 } | |
439 | |
452
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
440 #ifdef ENABLE_PROFILE_RESET |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
441 void resetDiveProfile() |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
442 { |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
443 uint8_t stepBack; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
444 SLogbookHeader logbookHeader; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
445 convert_Type dataStart; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
446 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
|
447 logbook_getHeader(stepBack ,&logbookHeader); |
38 | 448 |
452
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
449 dataStart.u8bit.byteHigh = 0; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
450 dataStart.u8bit.byteLow = logbookHeader.pBeginProfileData[0]; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
451 dataStart.u8bit.byteMidLow = logbookHeader.pBeginProfileData[1]; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
452 dataStart.u8bit.byteMidHigh = logbookHeader.pBeginProfileData[2]; |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
453 |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
454 dataStart.u32bit &= 0xFFFF0000; /* set to sector start */ |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
455 ext_flash_invalidate_sample_index(dataStart.u32bit); |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
456 } |
b90ddf57f7f1
Added compile variant enabling the reset of profile sample information:
ideenmodellierer
parents:
186
diff
changeset
|
457 #endif |