diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-02-12 17:47:52 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-02-17 07:26:55 -0800 |
commit | 8103e947aa80da275afe692bc19fa7bb88ccd033 (patch) | |
tree | 598ddd2116455308c9133561b5e8b2b01fba536d /core/planner.c | |
parent | 93ecad1b0413645ba59ffe2e50c3636d8673ccb5 (diff) | |
download | subsurface-8103e947aa80da275afe692bc19fa7bb88ccd033.tar.gz |
planner: pass in_planner argument to vpmb_next_gradient()
To remove reliance on global state, pass an "in_planner" argument
to vpmb_next_gradient(). Thus, calls to in_planner() can be removed.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/planner.c')
-rw-r--r-- | core/planner.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/planner.c b/core/planner.c index f78031644..e5479b6fd 100644 --- a/core/planner.c +++ b/core/planner.c @@ -849,7 +849,7 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i decostopcounter = 0; is_final_plan = (decoMode() == BUEHLMANN) || (previous_deco_time - ds->deco_time < 10); // CVA time converges if (ds->deco_time != 10000000) - vpmb_next_gradient(ds, ds->deco_time, diveplan->surface_pressure / 1000.0); + vpmb_next_gradient(ds, ds->deco_time, diveplan->surface_pressure / 1000.0, true); previous_deco_time = ds->deco_time; restore_deco_state(bottom_cache, ds, true); |