aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-26 13:25:50 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-26 13:25:50 -0700
commitcf3701bbac2f593c6efe046ba15be55bc1360f5b (patch)
tree8be0756467f06a714ee132e71e10dd731173d874
parent42c54e7b7e202edcc6a568c4e91f1e973af0e208 (diff)
downloadsubsurface-cf3701bbac2f593c6efe046ba15be55bc1360f5b.tar.gz
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 <dirk@hohndel.org>
-rw-r--r--planner.c3
1 files changed, 2 insertions, 1 deletions
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);