summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2014-11-21 11:10:19 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-21 07:42:09 -0800
commit1dfebe7c1097a47e05d3c501706d6812fe9b83aa (patch)
treeb8e30b54e6a6bb509daa7c53e84fa1130c23b5e0
parente288751353ad86dfb05a820f8a71dc2b75fcfb79 (diff)
downloadsubsurface-1dfebe7c1097a47e05d3c501706d6812fe9b83aa.tar.gz
Don't plan gas switches when in CCR mode
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--planner.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/planner.c b/planner.c
index 6f09b8e5f..e877f4e84 100644
--- a/planner.c
+++ b/planner.c
@@ -790,7 +790,13 @@ int plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool s
best_first_ascend_cylinder = current_cylinder;
/* Find the gases available for deco */
- gaschanges = analyze_gaslist(diveplan, &gaschangenr, depth, &best_first_ascend_cylinder);
+
+ if (po2) { // Don't change gas in CCR mode
+ gaschanges = NULL;
+ gaschangenr = 0;
+ } else {
+ gaschanges = analyze_gaslist(diveplan, &gaschangenr, depth, &best_first_ascend_cylinder);
+ }
/* Find the first potential decostopdepth above current depth */
for (stopidx = 0; stopidx < sizeof(decostoplevels) / sizeof(int); stopidx++)
if (decostoplevels[stopidx] >= depth)