diff 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
line wrap: on
line diff
--- a/Discovery/Src/t3.c	Thu Mar 11 21:43:43 2021 +0100
+++ b/Discovery/Src/t3.c	Thu Mar 11 21:45:22 2021 +0100
@@ -244,6 +244,8 @@
 
 void t3_miniLiveLogProfile(void)
 {
+	static uint8_t wasDecoDive = 0;
+
     SWindowGimpStyle wintemp;
     uint16_t replayDataLength = 0;
     uint16_t liveDataLength = 0;
@@ -324,9 +326,14 @@
     snprintf(text,TEXTSIZE,"\002%01.1fm", max_depth / 100.0);
     GFX_write_string(&FontT42,&t3c1,text,0);
 
+    if(getMiniLiveReplayLength() < 10)		/* new dive startet => reset the visualization state for deco data */
+    {
+    	wasDecoDive = 0;
+    }
 
-    if(pDecoinfo->output_time_to_surface_seconds)		/* draw deco data first => will be overlayed by all other informations */
+    if((pDecoinfo->output_time_to_surface_seconds) || (wasDecoDive))		/* draw deco data first => will be overlayed by all other informations */
     {
+    	wasDecoDive = 1;
     	GFX_graph_print(&t3screen,&wintemp,wintemp.top * -1,1,0,max_depth, getMiniLiveDecoPointerToData(),drawDataLength, CLUT_NiceGreen, NULL);
     }