diff Discovery/Src/t7.c @ 954:4e4fbd73e329 Evo_2_23

Slow exit graph draw normal ascent if slow exit is inactive: In previous version no graph was drawn at all if the minumum activation time (15 minutes) of the slow exit function was not reached. In the new version the normal ascent graph will be shown in case the slow exit was not activated yet.
author Ideenmodellierer
date Wed, 01 Jan 2025 17:30:50 +0100
parents e9c37071933b
children 9b29995d6619
line wrap: on
line diff
--- a/Discovery/Src/t7.c	Wed Jan 01 17:28:36 2025 +0100
+++ b/Discovery/Src/t7.c	Wed Jan 01 17:30:50 2025 +0100
@@ -2809,18 +2809,21 @@
     GFX_write_string(&FontT105,&t7l2,TextL2,1);
 
 /* ascent rate graph */
-
+    color = 0xff;
     if((pSettings->slowExitTime != 0) && (nextstopDepthMeter == 0) && (stateUsed->lifeData.depth_meter < pSettings->last_stop_depth_meter))
     {
     	color = t7_drawSlowExitGraph();
     }
-    else if(stateUsed->lifeData.ascent_rate_meter_per_min > 1)	/* a value < 1 would cause a bar in negative direction brush rectangle of 12 and step width of 6 */
+    if(color == 0xff)
     {
-        color = drawingColor_from_ascentspeed(stateUsed->lifeData.ascent_rate_meter_per_min);
-    	t7_drawAcentGraph(color);
+    	color = drawingColor_from_ascentspeed(stateUsed->lifeData.ascent_rate_meter_per_min);
+    	if(stateUsed->lifeData.ascent_rate_meter_per_min > 1)	/* a value < 1 would cause a bar in negative direction brush rectangle of 12 and step width of 6 */
+    	{
+
+    	    	t7_drawAcentGraph(color);
+    	}
     }
 
-
     /* depth */
     float depth = unit_depth_float(stateUsed->lifeData.depth_meter);
 
@@ -4877,6 +4880,10 @@
 		stop.y = start.y;
 		GFX_draw_thick_line(10,&t7screen, start, stop, 9);
 	}
+	else
+	{
+		color = 0xff;
+	}
 	return color;
 }
 void t7_tick(void)