changeset 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 d565812061f4
children 9b29995d6619
files Discovery/Src/t3.c Discovery/Src/t7.c
diffstat 2 files changed, 18 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Src/t3.c	Wed Jan 01 17:28:36 2025 +0100
+++ b/Discovery/Src/t3.c	Wed Jan 01 17:30:50 2025 +0100
@@ -535,11 +535,12 @@
     }
     else
     {
+    	color = 0xff;
     	if((pSettings->slowExitTime != 0) && (nextstopDepthMeter == 0) && (stateUsed->lifeData.depth_meter < pSettings->last_stop_depth_meter))
     	{
     		color = t3_drawSlowExitGraph(tXscreen, tXl1, tXr1);
     	}
-    	else
+    	if(color == 0xff)	/* no slow exit => continue with common ascent graph */
     	{
 			if(stateUsed->lifeData.ascent_rate_meter_per_min > 0) /* ascentrate graph -standard mode */
 			{
@@ -2234,5 +2235,9 @@
 		stop.y = start.y;
 		GFX_draw_thick_line(10,tXscreen, start, stop, 9);
 	}
+	else
+	{
+		color = 0xff;
+	}
 	return color;
 }
--- 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)