From f6b29d093f51508312846c8dcf7e1f9e104d0796 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Wed, 20 Nov 2013 19:52:17 +0100 Subject: Use get_cylinder_index in per_cylinder_mean_depth Use get_cylinder_index that handles SAMPLE_EVENT_GASCHANGE and SAMPLE_EVENT_GASCHANGE2. This also removes the need for a special case where get_gasidx returns -1, because get_cylinder_index always returns the "closest" gas that it finds. Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'profile.c') diff --git a/profile.c b/profile.c index c0520bc43..0f90370f0 100644 --- a/profile.c +++ b/profile.c @@ -553,7 +553,7 @@ static void fill_missing_tank_pressures(struct dive *dive, struct plot_info *pi, } } -static int get_cylinder_index(struct dive *dive, struct event *ev) +int get_cylinder_index(struct dive *dive, struct event *ev) { int i; int best = 0, score = INT_MAX; -- cgit v1.2.3-70-g09d2