diff options
author | Robert C. Helling <helling@atdotde.de> | 2014-10-22 11:27:10 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-10-22 06:14:24 -0700 |
commit | d42b07a30a01790cd7dcd6320098cdad2d6b6218 (patch) | |
tree | c48f3bd1371117ea2f4137286df50a822083e873 /parse-xml.c | |
parent | 7afc65b99b63f9f614cb79d0fa528dcd75ec80e2 (diff) | |
download | subsurface-d42b07a30a01790cd7dcd6320098cdad2d6b6218.tar.gz |
Set dctype of dives with pO2 setpoint information to CCR.
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 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/parse-xml.c b/parse-xml.c index feb39d130..d54456e92 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -895,8 +895,10 @@ 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)) + if (MATCH("po2.sample", double_to_o2pressure, &sample->setpoint)) { + cur_dive->dc.dctype = CCR; return; + } if (MATCH("heartbeat", get_uint8, &sample->heartbeat)) return; if (MATCH("bearing", get_bearing, &sample->bearing)) @@ -2027,8 +2029,10 @@ extern int shearwater_profile_sample(void *handle, int columns, char **data, cha cur_sample->depth.mm = metric ? atof(data[1]) * 1000 : feet_to_mm(atof(data[1])); if (data[2]) cur_sample->temperature.mkelvin = metric ? C_to_mkelvin(atof(data[2])) : F_to_mkelvin(atof(data[2])); - if (data[3]) + if (data[3]) { cur_sample->setpoint.mbar = atof(data[3]) * 1000; + cur_dive->dc.dctype = CCR; + } if (data[4]) cur_sample->ndl.seconds = atoi(data[4]) * 60; if (data[5]) |