summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2014-10-19 07:07:07 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-19 07:07:07 -0700
commit5f44fdd9cf6fba073837cbc1d89c6ed3ea28dd76 (patch)
treeccf7ecf769b5b3240fa313233eff78c0f52c7881 /dive.c
parent839bcaaf70b763590509031208b6786288910bc3 (diff)
downloadsubsurface-5f44fdd9cf6fba073837cbc1d89c6ed3ea28dd76.tar.gz
Make planner work again for CCR dives
The latest CCR patches had rendered the planner not usable for CCR dives. This patch corrects this (and reenables the CCR set point column for segments). The problem was that a new member setpoint of struct divepoint had been introduced, but there was already po2 which had the same meaning. This patch merges the two and renames them setpoint to prevent future confusion. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dive.c b/dive.c
index 1409bd313..92637feef 100644
--- a/dive.c
+++ b/dive.c
@@ -1167,10 +1167,10 @@ static void fixup_dive_dc(struct dive *dive, struct divecomputer *dc)
}
// If there are consecutive identical CCR O2 setpoint readings, throw away the redundant ones.
- o2val = sample->o2setpoint.mbar;
+ o2val = sample->setpoint.mbar;
if (o2val) {
if (lasto2setpoint == o2val)
- sample->o2setpoint.mbar = 0;
+ sample->setpoint.mbar = 0;
else
lasto2setpoint = o2val;
}
@@ -1378,8 +1378,8 @@ static void merge_samples(struct divecomputer *res, struct divecomputer *a, stru
sample.sensor = as->sensor;
if (as->cns)
sample.cns = as->cns;
- if (as->po2.mbar)
- sample.po2 = as->po2;
+ if (as->setpoint.mbar)
+ sample.setpoint = as->setpoint;
if (as->ndl.seconds)
sample.ndl = as->ndl;
if (as->stoptime.seconds)