mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Assign setpoint to correct sample in planner
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
702c751ecf
commit
81fce5ad19
1 changed files with 2 additions and 2 deletions
|
@ -332,11 +332,11 @@ static void create_dive_from_plan(struct diveplan *diveplan, bool track_gas)
|
|||
sample = prepare_sample(dc);
|
||||
/* set po2 at beginning of this segment */
|
||||
/* and keep it valid for last sample - where it likely doesn't matter */
|
||||
sample->setpoint.mbar = po2;
|
||||
sample[-1].setpoint.mbar = po2;
|
||||
sample->time.seconds = lasttime = time;
|
||||
sample->depth.mm = lastdepth = depth;
|
||||
sample->manually_entered = dp->entered;
|
||||
if (track_gas && !sample->setpoint.mbar) { /* Don't track gas usage for CCR legs of dive */
|
||||
if (track_gas && !sample[-1].setpoint.mbar) { /* Don't track gas usage for CCR legs of dive */
|
||||
update_cylinder_pressure(&displayed_dive, sample[-1].depth.mm, depth, time - sample[-1].time.seconds,
|
||||
dp->entered ? diveplan->bottomsac : diveplan->decosac, cyl, !dp->entered);
|
||||
if (cyl->type.workingpressure.mbar)
|
||||
|
|
Loading…
Reference in a new issue