From 4fa576526f0152327ddf4b0381e79adc8debd22e Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Tue, 3 Oct 2017 11:12:35 +0200 Subject: Planner creating dive from plan: No pressure for 1st sample with new gas In the planner when a dive is created from the diveplan every first sample with a new gas shouldn't have a pressure value added. Otherwise the interpolation code for the pressure graph in the profile will draw the pressure graph incorrectly. Signed-off-by: Stefan Fuchs --- core/planner.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/planner.c b/core/planner.c index 5a50130fd..338b89cd2 100644 --- a/core/planner.c +++ b/core/planner.c @@ -330,8 +330,6 @@ static void create_dive_from_plan(struct diveplan *diveplan, struct dive *dive, sample->depth = lastdepth; sample->manually_entered = dp->entered; sample->sac.mliter = dp->entered ? prefs.bottomsac : prefs.decosac; - if (track_gas && cyl->type.workingpressure.mbar) - sample->pressure[0].mbar = cyl->sample_end.mbar; finish_sample(dc); lastcylid = dp->cylinderid; } -- cgit v1.2.3-70-g09d2