summaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-01-05 22:59:19 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-05 14:08:06 -0800
commit11542d84f76d29e9ae549a89994c007831f8d755 (patch)
treedac9cb0aa4d9467ea86b8f5d271fe6290efb8495 /parse-xml.c
parent5e56bbf2aa3f480a3e6d98e9c5a20c315cfe063f (diff)
downloadsubsurface-11542d84f76d29e9ae549a89994c007831f8d755.tar.gz
DLF import: Decode and import NDL and TTS
The units of these values are guessed, but these values makes they match up well with the values we calculate ourself. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/parse-xml.c b/parse-xml.c
index cde67327f..1f1b87ee5 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -2596,6 +2596,12 @@ int parse_dlf_buffer(unsigned char *buffer, size_t size)
// because we rather calculate ppo2 our selfs.
if (cur_dc->dctype == CCR || cur_dc->dctype == PSCR)
cur_sample->o2sensor[0].mbar = ((ptr[7] << 8) + ptr[6]) / 10;
+ if (!ptr[8] && ptr[9])
+ cur_sample->in_deco = true;
+ // Guessed unit here.. looks good.
+ cur_sample->ndl.seconds = ptr[8] * 60;
+ // Guessed unit here.. looks good.
+ cur_sample->tts.seconds = ((ptr[10] & 0x0F) << 4) + ptr[9] * 20;
sample_end();
break;
case 1: