diff options
author | Rick Walsh <rickmwalsh@gmail.com> | 2016-07-06 22:40:28 +1000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-07-09 12:07:25 -0700 |
commit | b1ed04a7f462d88b28b1abab881a0e1a8acc212a (patch) | |
tree | 3281beb6fb2789d790330e14a07266ec8df4c5c9 /core/planner.h | |
parent | 066f79223cf49cda5f762b3b9413774b8417cb9f (diff) | |
download | subsurface-b1ed04a7f462d88b28b1abab881a0e1a8acc212a.tar.gz |
Have divedatapoint store cylinder id instead of gasmix
Determining the correct cylinder index from a known gas mix can be
complicated, but it is trivial to look up the gasmix from the cylinder_t
structure.
It makes sense to remember which cylinder is being used. This simplifies
handling changing a cylinder's gas mix, either directly by the user, or
indirectly in the planner. It also permits tracking of multiple cylinders of
the same mix, e.g. independent twins / sidemount.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/planner.h')
-rw-r--r-- | core/planner.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/planner.h b/core/planner.h index a675989e0..3298d7ddb 100644 --- a/core/planner.h +++ b/core/planner.h @@ -17,6 +17,7 @@ extern void set_display_runtime(bool display); extern void set_display_duration(bool display); extern void set_display_transitions(bool display); extern void get_gas_at_time(struct dive *dive, struct divecomputer *dc, duration_t time, struct gasmix *gas); +extern int get_cylinderid_at_time(struct dive *dive, struct divecomputer *dc, duration_t time); extern int get_gasidx(struct dive *dive, struct gasmix *mix); extern bool diveplan_empty(struct diveplan *diveplan); |