From cf3701bbac2f593c6efe046ba15be55bc1360f5b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 26 May 2014 13:25:50 -0700 Subject: Planner: convert assert into warning We need to make sure we let the user know about this in a more user friendly way... Signed-off-by: Dirk Hohndel --- planner.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'planner.c') diff --git a/planner.c b/planner.c index d3b5f288c..cf274bb31 100644 --- a/planner.c +++ b/planner.c @@ -676,7 +676,8 @@ void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep, b /* We will break out when we hit the surface */ do { /* Ascend to next stop depth */ - assert(deco_allowed_depth(tissue_tolerance, diveplan->surface_pressure / 1000.0, dive, 1) < depth); + if (deco_allowed_depth(tissue_tolerance, diveplan->surface_pressure / 1000.0, dive, 1) < depth) + fprintf(stderr, "user provided way point above ceiling\n"); int deltad = ascend_velocity(depth, avg_depth, bottom_time) * TIMESTEP; if (ascend_velocity(depth, avg_depth, bottom_time) != last_ascend_rate) { plan_add_segment(diveplan, clock - previous_point_time, depth, o2, he, po2, false); -- cgit v1.2.3-70-g09d2