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 <sfuchs@gmx.de>
This commit is contained in:
Stefan Fuchs 2017-10-03 11:12:35 +02:00 committed by Robert C. Helling
parent bfe52f6689
commit 4fa576526f

View file

@ -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;
}