mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Correctly merge cns, ndl and deco information
I keep forgetting to do that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
afda6dac51
commit
f0e471e0da
1 changed files with 7 additions and 0 deletions
7
dive.c
7
dive.c
|
@ -715,6 +715,12 @@ add_sample_b:
|
||||||
sample.cns = as->cns;
|
sample.cns = as->cns;
|
||||||
if (as->po2)
|
if (as->po2)
|
||||||
sample.po2 = 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);
|
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);
|
MERGE_MAX_PREFDL(res, dl, a, b, maxdepth.mm);
|
||||||
res->meandepth.mm = 0;
|
res->meandepth.mm = 0;
|
||||||
MERGE_NONZERO(res, a, b, salinity);
|
MERGE_NONZERO(res, a, b, salinity);
|
||||||
|
MERGE_NONZERO(res, a, b, cns);
|
||||||
MERGE_NONZERO(res, a, b, visibility);
|
MERGE_NONZERO(res, a, b, visibility);
|
||||||
MERGE_NONZERO(res, a, b, surface_pressure.mbar);
|
MERGE_NONZERO(res, a, b, surface_pressure.mbar);
|
||||||
MERGE_MAX_PREFDL(res, dl, a, b, duration.seconds);
|
MERGE_MAX_PREFDL(res, dl, a, b, duration.seconds);
|
||||||
|
|
Loading…
Add table
Reference in a new issue