[PATCH] DLF import: set no_o2sensors in CCR/PSCR mode
Anton Lundin
glance at acc.umu.se
Tue Jan 6 04:23:31 PST 2015
This triggers the rest of the code to treat the sensor value as our
ppO2 value.
Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
parse-xml.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/parse-xml.c b/parse-xml.c
index fe13f66..4cac31a 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -2580,6 +2580,10 @@ int parse_dlf_buffer(unsigned char *buffer, size_t size)
/* Done with parsing what we know about the dive header */
ptr += 32;
+ // We're going to interpret ppO2 saved as a sensor value in these modes.
+ if (cur_dc->dctype == CCR || cur_dc->dctype == PSCR)
+ cur_dc->no_o2sensors = 1;
+
while (ptr < buffer + size) {
time = ((ptr[0] >> 4) & 0x0f) +
((ptr[1] << 4) & 0xff0) +
--
2.1.0
More information about the subsurface
mailing list