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>
This commit is contained in:
Dirk Hohndel 2013-02-08 20:44:04 -08:00
parent b8c7992bbf
commit 1511271201
6 changed files with 19 additions and 17 deletions

3
dive.c
View file

@ -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);
}