mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Divinglog import: update O2sensors and dive mode
This is my best guess, and I have no sample logs that would prove my assumption. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6e109a2129
commit
5d12723656
1 changed files with 14 additions and 0 deletions
14
parse-xml.c
14
parse-xml.c
|
@ -3006,6 +3006,20 @@ extern int divinglog_profile(void *handle, int columns, char **data, char **colu
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* My best guess is that if we have o2sensors, then it
|
||||||
|
* is either CCR or PSCR dive. And the first time we
|
||||||
|
* have O2 sensor readings, we can count them to get
|
||||||
|
* the amount O2 sensors.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!cur_dive->dc.no_o2sensors) {
|
||||||
|
cur_dive->dc.no_o2sensors = cur_sample->o2sensor[0].mbar ? 1 : 0 +
|
||||||
|
cur_sample->o2sensor[1].mbar ? 1 : 0 +
|
||||||
|
cur_sample->o2sensor[2].mbar ? 1 : 0;
|
||||||
|
cur_dive->dc.divemode = CCR;
|
||||||
|
}
|
||||||
|
|
||||||
ptr += 12;
|
ptr += 12;
|
||||||
sample_end();
|
sample_end();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue