diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-02-13 21:07:22 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-13 21:07:22 -0800 |
commit | 6dd6e9068452dc12666aa45cf464031c8a8b0d57 (patch) | |
tree | 30f2dc573725a87288dfa9d12db4bed21e154d29 /parse-xml.c | |
parent | 1527cd0d05f01dda47bf3634e872580a40000702 (diff) | |
download | subsurface-6dd6e9068452dc12666aa45cf464031c8a8b0d57.tar.gz |
Don't force the first divecomputer to CCR just because there's po2 value
The existing code was bogus as it used cur_dive->dc instead of cur_dc
(i.e., it always changed the first dive computer, even if the po2 was
found in a different one).
But fundamentally I consider this bogus. We are not doing the right thing
here - some dive computer send us pO2 values that are just the calculated
pO2 at a depth and NOT a setpoint, yet we pretend those are setpoints and
then turn these dives into CCR dives.
This needs to done differently.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/parse-xml.c b/parse-xml.c index 5c5346c09..cfe3459ed 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -935,10 +935,8 @@ static void try_to_fill_sample(struct sample *sample, const char *name, char *bu return; if (MATCH("sensor3.sample", double_to_o2pressure, &sample->o2sensor[2])) // up to 3 CCR sensors return; - if (MATCH("po2.sample", double_to_o2pressure, &sample->setpoint)) { - cur_dive->dc.divemode = CCR; + if (MATCH("po2.sample", double_to_o2pressure, &sample->setpoint)) return; - } if (MATCH("heartbeat", get_uint8, &sample->heartbeat)) return; if (MATCH("bearing", get_bearing, &sample->bearing)) |