summaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-07-17 15:04:50 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-17 08:50:57 -0700
commit5e439cef630e16c4c55441cc17109b909e482654 (patch)
treea9e25e338633c9d8237ab87a89cd5013d98b9330 /parse-xml.c
parent70198ef11b215939c6ad4374f8fbdc5b4ce24c0b (diff)
downloadsubsurface-5e439cef630e16c4c55441cc17109b909e482654.tar.gz
Divinglog import: add cns value
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/parse-xml.c b/parse-xml.c
index 58cbffc18..1c384e3f9 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -2882,7 +2882,7 @@ extern int divinglog_profile(void *handle, int columns, char **data, char **colu
{
int sinterval = 0;
unsigned long i, len, lenprofile2 = 0;
- char *ptr, temp[4], pres[5], hbeat[4], stop[4], stime[4], ndl[4], ppo2_1[4], ppo2_2[4], ppo2_3[4];
+ char *ptr, temp[4], pres[5], hbeat[4], stop[4], stime[4], ndl[4], ppo2_1[4], ppo2_2[4], ppo2_3[4], cns[5];
short oldcyl = -1;
/* We do not have samples */
@@ -2990,6 +2990,7 @@ extern int divinglog_profile(void *handle, int columns, char **data, char **colu
memcpy(ppo2_1, &data[5][i * 19 + 0], 3);
memcpy(ppo2_2, &data[5][i * 19 + 3], 3);
memcpy(ppo2_3, &data[5][i * 19 + 6], 3);
+ memcpy(cns, &data[5][i * 19 + 13], 4);
if (atoi(ppo2_1) > 0)
cur_sample->o2sensor[0].mbar = atoi(ppo2_1) * 100;
@@ -2997,6 +2998,8 @@ extern int divinglog_profile(void *handle, int columns, char **data, char **colu
cur_sample->o2sensor[1].mbar = atoi(ppo2_2) * 100;
if (atoi(ppo2_3) > 0)
cur_sample->o2sensor[2].mbar = atoi(ppo2_3) * 100;
+ if (atoi(cns) > 0)
+ cur_sample->cns = rint(atoi(cns) / 10);
}