diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-02-08 20:44:04 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-02-08 20:44:04 -0800 |
commit | 15112712019817e4e64b5c35b7bb38315125e920 (patch) | |
tree | d09295d8284cb8978815d6b38784341fee636e10 /dive.c | |
parent | b8c7992bbfe03dce665cbd5ba6144b0c8b59b6fd (diff) | |
download | subsurface-15112712019817e4e64b5c35b7bb38315125e920.tar.gz |
Add maxdepth back to the dive structure
Populate during dive fixup as the maximum depth shown by all the
divecomputers. Use this value (instead of the one in the first
divecomputer) in printing, statistics, etc.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -626,7 +626,8 @@ static void fixup_dive_dc(struct dive *dive, struct divecomputer *dc) update_depth(&dc->meandepth, depthtime); update_temperature(&dc->watertemp, mintemp); update_depth(&dc->maxdepth, maxdepth); - + if (maxdepth > dive->maxdepth.mm) + dive->maxdepth.mm = maxdepth; fixup_dc_events(dc); } |