summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2018-09-10 20:29:20 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-12 14:14:14 -0700
commit015bd43c25becf46897efa0a274730929c74ab51 (patch)
treea4c7caa987c6711c18767fc8599668ee5c4664b0
parent1ad872ac5f21a75b397ac8ed6544ef6f967d633f (diff)
downloadsubsurface-015bd43c25becf46897efa0a274730929c74ab51.tar.gz
DLF import: Set initial gas as first cylinder
Signed-off-by: Anton Lundin <glance@acc.umu.se>
-rw-r--r--core/parse-xml.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/parse-xml.c b/core/parse-xml.c
index 8cb795545..70407706d 100644
--- a/core/parse-xml.c
+++ b/core/parse-xml.c
@@ -1731,6 +1731,10 @@ int parse_dlf_buffer(unsigned char *buffer, size_t size, struct dive_table *tabl
cur_dc->maxdepth.mm = ((ptr[21] << 8) + ptr[20]) * 10;
cur_dc->surface_pressure.mbar = ((ptr[25] << 8) + ptr[24]) / 10;
+ // Declare initial mix as first cylinder
+ cur_dive->cylinder[0].gasmix.o2.permille = ptr[26] * 10;
+ cur_dive->cylinder[0].gasmix.he.permille = ptr[27] * 10;
+
/* Done with parsing what we know about the dive header */
ptr += 32;