comparison 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
comparison
equal deleted inserted replaced
953:d565812061f4 954:4e4fbd73e329
2807 2807
2808 Gfx_colorsscheme_mod(TextL2, 0); 2808 Gfx_colorsscheme_mod(TextL2, 0);
2809 GFX_write_string(&FontT105,&t7l2,TextL2,1); 2809 GFX_write_string(&FontT105,&t7l2,TextL2,1);
2810 2810
2811 /* ascent rate graph */ 2811 /* ascent rate graph */
2812 2812 color = 0xff;
2813 if((pSettings->slowExitTime != 0) && (nextstopDepthMeter == 0) && (stateUsed->lifeData.depth_meter < pSettings->last_stop_depth_meter)) 2813 if((pSettings->slowExitTime != 0) && (nextstopDepthMeter == 0) && (stateUsed->lifeData.depth_meter < pSettings->last_stop_depth_meter))
2814 { 2814 {
2815 color = t7_drawSlowExitGraph(); 2815 color = t7_drawSlowExitGraph();
2816 } 2816 }
2817 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 */ 2817 if(color == 0xff)
2818 { 2818 {
2819 color = drawingColor_from_ascentspeed(stateUsed->lifeData.ascent_rate_meter_per_min); 2819 color = drawingColor_from_ascentspeed(stateUsed->lifeData.ascent_rate_meter_per_min);
2820 t7_drawAcentGraph(color); 2820 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 */
2821 } 2821 {
2822 2822
2823 t7_drawAcentGraph(color);
2824 }
2825 }
2823 2826
2824 /* depth */ 2827 /* depth */
2825 float depth = unit_depth_float(stateUsed->lifeData.depth_meter); 2828 float depth = unit_depth_float(stateUsed->lifeData.depth_meter);
2826 2829
2827 if(depth <= 0.3f) 2830 if(depth <= 0.3f)
4875 4878
4876 start.y = start.y - (stateUsed->lifeData.depth_meter * (ASCENT_GRAPH_YPIXEL) / pSettings->last_stop_depth_meter); 4879 start.y = start.y - (stateUsed->lifeData.depth_meter * (ASCENT_GRAPH_YPIXEL) / pSettings->last_stop_depth_meter);
4877 stop.y = start.y; 4880 stop.y = start.y;
4878 GFX_draw_thick_line(10,&t7screen, start, stop, 9); 4881 GFX_draw_thick_line(10,&t7screen, start, stop, 9);
4879 } 4882 }
4883 else
4884 {
4885 color = 0xff;
4886 }
4880 return color; 4887 return color;
4881 } 4888 }
4882 void t7_tick(void) 4889 void t7_tick(void)
4883 { 4890 {
4884 SSettings *settings = settingsGetPointer(); 4891 SSettings *settings = settingsGetPointer();