diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-07-12 23:17:01 +0530 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-12 13:58:17 -0700 |
commit | 7fffe8aba04b0614b277ab483f084859017f081a (patch) | |
tree | f9bc627777038a16821d7f2ad55294b0d2528d17 /parse-xml.c | |
parent | e53897cd158150995b48cb641dda1b8697d0099b (diff) | |
download | subsurface-7fffe8aba04b0614b277ab483f084859017f081a.tar.gz |
Divinglog import: adding pressure samples
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.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/parse-xml.c b/parse-xml.c index 974906e58..991b1e962 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]; + char *ptr, temp[4], pres[5]; /* We do not have samples */ if (!data[1]) @@ -2938,6 +2938,11 @@ extern int divinglog_profile(void *handle, int columns, char **data, char **colu cur_sample->temperature.mkelvin = C_to_mkelvin(atoi(temp) / 10); } + if (data[2]) { + memcpy(pres, &data[2][i * 11 + 3], 4); + cur_sample->cylinderpressure.mbar = atoi(pres) * 100; + } + ptr += 12; sample_end(); } |