DLF import: Decode ppO2

This decodes the ppO2 value stored in the DLF files. It looks like the
DiveSoft Freedom computers always stores the ppO2 value, even for OC
dives.
This import only stores the ppO2 value from CCR and PSCR dives, where
these values comes from sensors and makes sense to store.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2015-01-05 22:59:18 +01:00 committed by Dirk Hohndel
parent 6f3ef2a964
commit 5e56bbf2aa

View file

@ -2591,6 +2591,11 @@ int parse_dlf_buffer(unsigned char *buffer, size_t size)
sample_start();
cur_sample->time.seconds = time;
cur_sample->depth.mm = ((ptr[5] << 8) + ptr[4]) * 10;
// Crazy precision on these stored values...
// Only store value if we're in CCR/PSCR mode,
// 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;
sample_end();
break;
case 1: