diff options
author | Anton Lundin <glance@acc.umu.se> | 2013-11-20 19:52:17 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-20 11:21:48 -0800 |
commit | f6b29d093f51508312846c8dcf7e1f9e104d0796 (patch) | |
tree | 2a8e2514519fe1905671e2ae38ad7ecfdeabc2d9 /dive.h | |
parent | 51345e4ad828918a4e20b6aba40c3b0a137b1e73 (diff) | |
download | subsurface-f6b29d093f51508312846c8dcf7e1f9e104d0796.tar.gz |
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 <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -662,6 +662,7 @@ extern void fill_default_cylinder(cylinder_t *cyl); extern void add_gas_switch_event(struct dive *dive, struct divecomputer *dc, int time, int idx); extern void add_event(struct divecomputer *dc, int time, int type, int flags, int value, const char *name); extern void per_cylinder_mean_depth(struct dive *dive, struct divecomputer *dc, int *mean, int *duration); +extern int get_cylinder_index(struct dive *dive, struct event *ev); /* UI related protopypes */ |