mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
066f79223c
commit
b1ed04a7f4
11 changed files with 98 additions and 142 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue