Mercurial > public > ostc4
changeset 915:ff318ae65dd0 Evo_2_23
SlowExitTimer:
Some modifications in the visualization e.g. to get the graph running in flipped mode
author | Ideenmodellierer |
---|---|
date | Sat, 19 Oct 2024 20:10:56 +0200 |
parents | 5ce7708a9095 |
children | 4832981f9af8 |
files | Discovery/Src/t7.c |
diffstat | 1 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Src/t7.c Sat Oct 19 20:06:55 2024 +0200 +++ b/Discovery/Src/t7.c Sat Oct 19 20:10:56 2024 +0200 @@ -2814,7 +2814,7 @@ /* ascent rate graph */ - if((pSettings->slowExitTime != 0) && (pDecoinfo->output_time_to_surface_seconds == 0) && (stateUsed->lifeData.depth_meter < pSettings->last_stop_depth_meter)) + if((pSettings->slowExitTime != 0) && (nextstopDepthMeter == 0) && (stateUsed->lifeData.depth_meter < pSettings->last_stop_depth_meter)) { color = t7_drawSlowExitGraph(); } @@ -4771,7 +4771,8 @@ GFX_draw_thick_line(12,&t7screen, start, stop, color); } -#define ASCENT_GRAPH_YPIXEL 120 +#define ASCENT_GRAPH_YPIXEL 110 + uint8_t t7_drawSlowExitGraph() /* this function is only called if diver is below last last stop depth */ { @@ -4869,7 +4870,7 @@ start.y += drawingMeterStep; stop.y = start.y; start.x = CUSTOMBOX_LINE_LEFT - 1; - stop.x = start.x - 40; + stop.x = start.x - 38; GFX_draw_line(&t7screen, start, stop, 0); } @@ -4877,22 +4878,26 @@ stop.x = start.x; if(!pSettings->FlipDisplay) { - start.y = t7l1.WindowY0 + ASCENT_GRAPH_YPIXEL; + start.y = t7l1.WindowY0 + ASCENT_GRAPH_YPIXEL + 5; } else { - start.y = t7l3.WindowY0 - 25; + start.y = t7l3.WindowY0 - 25 + ASCENT_GRAPH_YPIXEL + 5; } stop.y = start.y - countDownSec * (ASCENT_GRAPH_YPIXEL / (float)(pSettings->slowExitTime * 60.0)); if(stop.y >= 470) stop.y = 470; + if(!pSettings->FlipDisplay) + { + stop.y += 5; + } GFX_draw_thick_line(15,&t7screen, start, stop, 3); /* mark diver depth */ - start.x = CUSTOMBOX_LINE_LEFT - CUSTOMBOX_OUTSIDE_OFFSET - 25; - stop.x = start.x + 15; - - start.y = start.y - (stateUsed->lifeData.depth_meter *120 / pSettings->last_stop_depth_meter); + start.x = CUSTOMBOX_LINE_LEFT - CUSTOMBOX_OUTSIDE_OFFSET - 30; + stop.x = start.x + 24; + + start.y = start.y - (stateUsed->lifeData.depth_meter * (ASCENT_GRAPH_YPIXEL) / pSettings->last_stop_depth_meter); stop.y = start.y; GFX_draw_thick_line(10,&t7screen, start, stop, 9); }