diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-12-11 12:30:34 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-12-11 13:40:40 -0800 |
commit | f0e471e0da191df4fda277240a39e3ed54858ec9 (patch) | |
tree | 76f0ba5781d2c1eb96e9cc70c4eb493b382df7be /dive.c | |
parent | afda6dac5193ac69f07981d0a0d8df20d554a5dd (diff) | |
download | subsurface-f0e471e0da191df4fda277240a39e3ed54858ec9.tar.gz |
Correctly merge cns, ndl and deco information
I keep forgetting to do that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -715,6 +715,12 @@ add_sample_b: sample.cns = as->cns; if (as->po2) sample.po2 = as->po2; + if (as->ndl.seconds) + sample.ndl = as->ndl; + if (as->stoptime.seconds) + sample.stoptime = as->stoptime; + if (as->stopdepth.mm) + sample.stopdepth = as->stopdepth; merge_one_sample(&sample, at, res); @@ -1400,6 +1406,7 @@ struct dive *merge_dives(struct dive *a, struct dive *b, int offset, gboolean pr MERGE_MAX_PREFDL(res, dl, a, b, maxdepth.mm); res->meandepth.mm = 0; MERGE_NONZERO(res, a, b, salinity); + MERGE_NONZERO(res, a, b, cns); MERGE_NONZERO(res, a, b, visibility); MERGE_NONZERO(res, a, b, surface_pressure.mbar); MERGE_MAX_PREFDL(res, dl, a, b, duration.seconds); |