diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-11-10 19:18:10 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-10 19:22:22 +0100 |
commit | f53788e5e4066f0ef36041031de6bc2726274fc9 (patch) | |
tree | 8d87d01759a85a53647476cfd693e56cc2fdd24f /dive.c | |
parent | 836bbad7a6c87c00fd99a14117f0d7b5fc8f9d7a (diff) | |
download | subsurface-f53788e5e4066f0ef36041031de6bc2726274fc9.tar.gz |
Add support for obtaining salinity from libdivecomputer
This requires a patched libdivecomputer that can return salinity of the
water the dive was conducted in. Experimental patches exist that implement
this for the OSTC. The code is designed so that it simply defaults to salt
water if libdivecomputer doesn't include the feature.
The patch also fixes the dive merge code to merge two other recent
additions to the dive structure (surface_pressure and visibility).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1082,6 +1082,9 @@ struct dive *try_to_merge(struct dive *a, struct dive *b, struct dive *next) MERGE_MAX(res, a, b, number); MERGE_MAX(res, a, b, maxdepth.mm); res->meandepth.mm = 0; + MERGE_NONZERO(res, a, b, salinity); + MERGE_NONZERO(res, a, b, visibility); + MERGE_NONZERO(res, a, b, surface_pressure.mbar); MERGE_MAX(res, a, b, duration.seconds); MERGE_MAX(res, a, b, surfacetime.seconds); MERGE_MAX(res, a, b, airtemp.mkelvin); |