diff options
author | Anton Lundin <glance@acc.umu.se> | 2015-01-06 13:23:31 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-22 06:26:49 +1200 |
commit | 8997fc88a305b7d95f486ddc4a0ac0cfc353ea8d (patch) | |
tree | 20e39883a57f155fa536b44ae35feb2f0011f030 /parse-xml.c | |
parent | e0c0ba4836a9cac104f1a8c40bb3e9c1da9d8747 (diff) | |
download | subsurface-8997fc88a305b7d95f486ddc4a0ac0cfc353ea8d.tar.gz |
DLF import: set no_o2sensors in CCR/PSCR mode
This triggers the rest of the code to treat the sensor value as our
ppO2 value.
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/parse-xml.c b/parse-xml.c index 47b4fcc24..4c2155a85 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -2590,6 +2590,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->divemode == CCR || cur_dc->divemode == PSCR) + cur_dc->no_o2sensors = 1; + while (ptr < buffer + size) { time = ((ptr[0] >> 4) & 0x0f) + ((ptr[1] << 4) & 0xff0) + |