Add planner infra structure for bailout

Add a divemode column to the planner model and a
corresponding field to struct divepoint and fill it
in the corresponding functions.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2018-03-28 22:50:28 +02:00 committed by Lubomir I. Ivanov
parent 6b0ecb012d
commit 69de9d8f98
5 changed files with 86 additions and 59 deletions

View file

@ -874,6 +874,7 @@ struct divedatapoint {
int setpoint;
bool entered;
struct divedatapoint *next;
enum dive_comp_type divemode;
};
struct diveplan {
@ -890,7 +891,7 @@ struct diveplan {
int surface_interval;
};
struct divedatapoint *plan_add_segment(struct diveplan *diveplan, int duration, int depth, int cylinderid, int po2, bool entered);
struct divedatapoint *plan_add_segment(struct diveplan *diveplan, int duration, int depth, int cylinderid, int po2, bool entered, enum dive_comp_type divemode);
struct divedatapoint *create_dp(int time_incr, int depth, int cylinderid, int po2);
#if DEBUG_PLAN
void dump_plan(struct diveplan *diveplan);