From ac8db01873c7caa2ac475d987269ee26c6daa46a Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Sun, 16 Dec 2018 20:52:34 +0100 Subject: Show average max depth in yearly statistics this was requested in #1854 and I think this suggestion makes sense Fixes #1854 Signed-off-by: Robert C. Helling --- core/statistics.c | 1 + core/statistics.h | 1 + 2 files changed, 2 insertions(+) (limited to 'core') diff --git a/core/statistics.c b/core/statistics.c index 6f5efe64f..d6d9418d7 100644 --- a/core/statistics.c +++ b/core/statistics.c @@ -53,6 +53,7 @@ static void process_dive(struct dive *dive, stats_t *stats) stats->max_depth.mm = dive->maxdepth.mm; if (stats->min_depth.mm == 0 || dive->maxdepth.mm < stats->min_depth.mm) stats->min_depth.mm = dive->maxdepth.mm; + stats->combined_max_depth.mm += dive->maxdepth.mm; process_temperatures(dive, stats); diff --git a/core/statistics.h b/core/statistics.h index d3707b9cb..6072f93b2 100644 --- a/core/statistics.h +++ b/core/statistics.h @@ -24,6 +24,7 @@ typedef struct depth_t max_depth; depth_t min_depth; depth_t avg_depth; + depth_t combined_max_depth; volume_t max_sac; volume_t min_sac; volume_t avg_sac; -- cgit v1.2.3-70-g09d2