mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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:
parent
6f3ef2a964
commit
5e56bbf2aa
1 changed files with 5 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue