diff options
author | willem ferguson <willemferguson@zoology.up.ac.za> | 2014-10-11 09:49:48 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-10-11 07:12:04 -0400 |
commit | 46bb02e8fc2878bc94f4f2543db74e20104eb6f2 (patch) | |
tree | 8b5e671c974ad1b5ed07c3de8622fb0270378571 /parse-xml.c | |
parent | 2282035a4d07548cb1677b16c5df97c7f98ea498 (diff) | |
download | subsurface-46bb02e8fc2878bc94f4f2543db74e20104eb6f2.tar.gz |
CCR patch: Import and store oxygen sensor data
This patch allows the importing of oxygen sensor and setpoint data from
Poseidon CCR dive logs.
1) Change parse-xml.c to read up to three oxygen sensor values from xml.
and to store the information in sample structures
2) Change parse-xml.c to read o2 setpoint values fro xml and to store
it in sample structures
3) Change dive.c to delete all sensor and setpoint values where
subsequent samples have sensor/setpoint values that are the same.
4) Change profile.c to store the sensor/setpoint values from the samples
into plotinfo.
5) Change the sample Poseidon xml log in the dives directory to ensure
the correct order and hierarchy of the dive and divecomputer nodes.
[Dirk Hohndel: minor cleanup, removed debug code, whitespace]
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/parse-xml.c b/parse-xml.c index 02cf9f771..6e74e8aaf 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -865,6 +865,14 @@ static void try_to_fill_sample(struct sample *sample, const char *name, char *bu return; if (MATCH("cns.sample", get_uint8, &sample->cns)) return; + if (MATCH("sensor1.sample", double_to_o2pressure, &sample->o2sensor[0])) // CCR O2 sensor data + return; + if (MATCH("sensor2.sample", double_to_o2pressure, &sample->o2sensor[1])) + 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)) return; if (MATCH("heartbeat", get_uint8, &sample->heartbeat)) |