mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Correct handling of O2 values below 21%
We incorrectly "fixed" those to be 21%. Not useful when diving trimix. Fixes #4 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2be4a9f961
commit
b63a5f0de6
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t
|
|||
he = gasmix.helium * 1000 + 0.5;
|
||||
|
||||
/* Ignore bogus data - libdivecomputer does some crazy stuff */
|
||||
if (o2 <= AIR_PERMILLE || o2 >= 1000)
|
||||
if (o2 + he <= AIR_PERMILLE || o2 >= 1000)
|
||||
o2 = 0;
|
||||
if (he < 0 || he >= 800 || o2+he >= 1000)
|
||||
he = 0;
|
||||
|
|
Loading…
Reference in a new issue