diff options
author | Robert C. Helling <helling@atdotde.de> | 2014-10-19 07:07:07 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-10-19 07:07:07 -0700 |
commit | 5f44fdd9cf6fba073837cbc1d89c6ed3ea28dd76 (patch) | |
tree | ccf7ecf769b5b3240fa313233eff78c0f52c7881 /parse-xml.c | |
parent | 839bcaaf70b763590509031208b6786288910bc3 (diff) | |
download | subsurface-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 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/parse-xml.c b/parse-xml.c index e88c9b944..feb39d130 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -895,9 +895,7 @@ 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("setpoint.sample", double_to_o2pressure, &sample->o2setpoint)) - return; - if (MATCH("po2.sample", double_to_o2pressure, &sample->po2)) + if (MATCH("po2.sample", double_to_o2pressure, &sample->setpoint)) return; if (MATCH("heartbeat", get_uint8, &sample->heartbeat)) return; @@ -1427,7 +1425,7 @@ static void sample_start(void) cur_sample->stoptime.seconds = laststoptime; cur_sample->stopdepth.mm = laststopdepth; cur_sample->cns = lastcns; - cur_sample->po2.mbar = lastpo2; + cur_sample->setpoint.mbar = lastpo2; cur_sample->sensor = lastsensor; } @@ -1442,7 +1440,7 @@ static void sample_end(void) laststoptime = cur_sample->stoptime.seconds; laststopdepth = cur_sample->stopdepth.mm; lastcns = cur_sample->cns; - lastpo2 = cur_sample->po2.mbar; + lastpo2 = cur_sample->setpoint.mbar; cur_sample = NULL; } @@ -2030,7 +2028,7 @@ extern int shearwater_profile_sample(void *handle, int columns, char **data, cha if (data[2]) cur_sample->temperature.mkelvin = metric ? C_to_mkelvin(atof(data[2])) : F_to_mkelvin(atof(data[2])); if (data[3]) - cur_sample->po2.mbar = atof(data[3]) * 1000; + cur_sample->setpoint.mbar = atof(data[3]) * 1000; if (data[4]) cur_sample->ndl.seconds = atoi(data[4]) * 60; if (data[5]) |