mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Planner: Correctly compute CNS and OTU for bailout segments
For dives with mixed divemode, one needs to check sample.setpoint to figure out if the segment is an OC segment and the po2 needs to be computed from the gasmix and ambient pressure. This fixes #3310 Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
edce243147
commit
c634a07e38
3 changed files with 44 additions and 33 deletions
|
|
@ -284,6 +284,8 @@ static void create_dive_from_plan(struct diveplan *diveplan, struct dive *dive,
|
|||
}
|
||||
sample = prepare_sample(dc);
|
||||
sample[-1].setpoint.mbar = po2;
|
||||
if (po2)
|
||||
sample[-1].o2sensor[0].mbar = po2;
|
||||
sample->time.seconds = lasttime + 1;
|
||||
sample->depth = lastdepth;
|
||||
sample->manually_entered = dp->entered;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue