diff options
author | Robert C. Helling <helling@atdotde.de> | 2019-03-20 16:29:27 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-03-29 06:51:12 -0700 |
commit | 5e494ce76106fe16f614e163c2bc6b8bf6903c86 (patch) | |
tree | 5162c2523e8a731eda22ce464e72c1d42124616d /core/planner.c | |
parent | 7635ee3e776f7adb96dda70ea21920569368ae30 (diff) | |
download | subsurface-5e494ce76106fe16f614e163c2bc6b8bf6903c86.tar.gz |
Show a bit of surface degassing in the planner
to display the deco parameters at the surface,
in particular tissue saturation and heat map.
Suggeted-by: Matthias Heinrichs <info@heinrichsweikamp.com>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/planner.c')
-rw-r--r-- | core/planner.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/planner.c b/core/planner.c index 5bcbdab7e..0177b9691 100644 --- a/core/planner.c +++ b/core/planner.c @@ -1080,6 +1080,14 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i diveplan->eff_gflow = lrint(100.0 * (regressiona() * first_stop_depth + regressionb())); } + for (int i = 0; i < MAX_CYLINDERS; i++) + if (cylinder_nodata(&dive->cylinder[i])) { + // Switch to an empty air cylinder for breathing air at the surface + // If no empty cylinder is found, keep using last deco gas + current_cylinder = i; + break; + } + plan_add_segment(diveplan, 600, 0, current_cylinder, 0, false, OC); create_dive_from_plan(diveplan, dive, is_planner); add_plan_to_notes(diveplan, dive, show_disclaimer, error); fixup_dc_duration(&dive->dc); |