diff options
author | Jan Schubert <Jan.Schubert@GMX.li> | 2013-01-14 23:53:38 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-14 20:12:40 -0800 |
commit | 90d3c5614a9c952a50e582e2dff6e21419c64729 (patch) | |
tree | 5298138cc67579e4e58f33e493c53a8dae05ad37 /libdivecomputer.c | |
parent | 2e53a415257677fe6e5da7fcce373722269a9082 (diff) | |
download | subsurface-90d3c5614a9c952a50e582e2dff6e21419c64729.tar.gz |
Centralising and redefining values as integers
This patch centralizes the definition for surface pressure, oxygen in
air, (re)defines all such values as plain integers and adapts calculations.
It eliminates 11 (!) occurrences of definitions for surface pressure and
also a few for oxygen in air.
It also rewrites the calculation for EAD, END and EADD using the new
definitons, harmonizing it for OC and CC and fixes a bug for EADD OC
calculation.
And finally it removes the unneeded variable entry_ead in gtk-gui.c.
Jan
Signed-off-by: Jan Schubert <Jan.Schubert@GMX.li>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r-- | libdivecomputer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c index 9529861dc..47bfd5c58 100644 --- a/libdivecomputer.c +++ b/libdivecomputer.c @@ -127,7 +127,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 + he <= AIR_PERMILLE || o2 >= 1000) + if (o2 + he <= O2_IN_AIR || o2 >= 1000) o2 = 0; if (he < 0 || he >= 800 || o2+he >= 1000) he = 0; |