diff options
author | Robert C. Helling <helling@atdotde.de> | 2017-08-23 22:43:33 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-08-29 06:49:44 -0700 |
commit | 82aac4efff7e0836e879e52b4e4e0f7301b165a9 (patch) | |
tree | f5f053d47bbd804c6545c668ee433c290b47f87f /core/dive.h | |
parent | 58d79488714ff7773916f3efe0970c424c8bd1cd (diff) | |
download | subsurface-82aac4efff7e0836e879e52b4e4e0f7301b165a9.tar.gz |
Make plan take dive and decotimestep as arguments
...rather than use a global variable and a macro.
This should be a no-op in preparation to allow planning
several versions of a dive.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/dive.h')
-rw-r--r-- | core/dive.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/dive.h b/core/dive.h index 1f007182d..0e0678c20 100644 --- a/core/dive.h +++ b/core/dive.h @@ -835,6 +835,8 @@ extern void subsurface_command_line_exit(int *, char ***); #define FRACTION(n, x) ((unsigned)(n) / (x)), ((unsigned)(n) % (x)) +#define DECOTIMESTEP 60 /* seconds. Unit of deco stop times */ + struct deco_state { double tissue_n2_sat[16]; double tissue_he_sat[16]; @@ -903,11 +905,12 @@ struct divedatapoint *create_dp(int time_incr, int depth, int cylinderid, int po #if DEBUG_PLAN void dump_plan(struct diveplan *diveplan); #endif -bool plan(struct diveplan *diveplan, struct deco_state **cached_datap, bool is_planner, bool show_disclaimer); +bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct deco_state **cached_datap, bool is_planner, bool show_disclaimer); void calc_crushing_pressure(double pressure); void vpmb_start_gradient(); void clear_vpmb_state(); + void delete_single_dive(int idx); struct event *get_next_event(struct event *event, const char *name); |