comparison Discovery/Src/t3.c @ 641:ed5422ac4ffb

Development Bugfix Deco bars not shown after last deco stop passed: In previous version the deco bars have only be shown in case a deco stop was pending. With the new implementation the keep being shown till the end of the dive.
author Ideenmodellierer
date Thu, 11 Mar 2021 21:45:22 +0100
parents 68d95049f11a
children c737cf5d9067
comparison
equal deleted inserted replaced
640:f735f1123526 641:ed5422ac4ffb
242 } 242 }
243 } 243 }
244 244
245 void t3_miniLiveLogProfile(void) 245 void t3_miniLiveLogProfile(void)
246 { 246 {
247 static uint8_t wasDecoDive = 0;
248
247 SWindowGimpStyle wintemp; 249 SWindowGimpStyle wintemp;
248 uint16_t replayDataLength = 0; 250 uint16_t replayDataLength = 0;
249 uint16_t liveDataLength = 0; 251 uint16_t liveDataLength = 0;
250 uint16_t drawDataLength = 0; 252 uint16_t drawDataLength = 0;
251 uint16_t* pReplayData; 253 uint16_t* pReplayData;
322 } 324 }
323 325
324 snprintf(text,TEXTSIZE,"\002%01.1fm", max_depth / 100.0); 326 snprintf(text,TEXTSIZE,"\002%01.1fm", max_depth / 100.0);
325 GFX_write_string(&FontT42,&t3c1,text,0); 327 GFX_write_string(&FontT42,&t3c1,text,0);
326 328
327 329 if(getMiniLiveReplayLength() < 10) /* new dive startet => reset the visualization state for deco data */
328 if(pDecoinfo->output_time_to_surface_seconds) /* draw deco data first => will be overlayed by all other informations */ 330 {
329 { 331 wasDecoDive = 0;
332 }
333
334 if((pDecoinfo->output_time_to_surface_seconds) || (wasDecoDive)) /* draw deco data first => will be overlayed by all other informations */
335 {
336 wasDecoDive = 1;
330 GFX_graph_print(&t3screen,&wintemp,wintemp.top * -1,1,0,max_depth, getMiniLiveDecoPointerToData(),drawDataLength, CLUT_NiceGreen, NULL); 337 GFX_graph_print(&t3screen,&wintemp,wintemp.top * -1,1,0,max_depth, getMiniLiveDecoPointerToData(),drawDataLength, CLUT_NiceGreen, NULL);
331 } 338 }
332 339
333 if(replayDataLength != 0) 340 if(replayDataLength != 0)
334 { 341 {