summaryrefslogtreecommitdiffstats
path: root/core/dive.h
diff options
context:
space:
mode:
authorGravatar Rick Walsh <rickmwalsh@gmail.com>2016-07-06 22:40:28 +1000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-07-09 12:07:25 -0700
commitb1ed04a7f462d88b28b1abab881a0e1a8acc212a (patch)
tree3281beb6fb2789d790330e14a07266ec8df4c5c9 /core/dive.h
parent066f79223cf49cda5f762b3b9413774b8417cb9f (diff)
downloadsubsurface-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/dive.h')
-rw-r--r--core/dive.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/dive.h b/core/dive.h
index 5988990b5..9c612048d 100644
--- a/core/dive.h
+++ b/core/dive.h
@@ -821,7 +821,7 @@ extern double tissue_tolerance_calc(const struct dive *dive, double pressure);
struct divedatapoint {
int time;
int depth;
- struct gasmix gasmix;
+ int cylinderid;
int setpoint;
bool entered;
struct divedatapoint *next;
@@ -838,8 +838,8 @@ struct diveplan {
struct divedatapoint *dp;
};
-struct divedatapoint *plan_add_segment(struct diveplan *diveplan, int duration, int depth, struct gasmix gasmix, int po2, bool entered);
-struct divedatapoint *create_dp(int time_incr, int depth, struct gasmix gasmix, int po2);
+struct divedatapoint *plan_add_segment(struct diveplan *diveplan, int duration, int depth, int cylinderid, int po2, bool entered);
+struct divedatapoint *create_dp(int time_incr, int depth, int cylinderid, int po2);
#if DEBUG_PLAN
void dump_plan(struct diveplan *diveplan);
#endif