Only honor drop stone mode when planning a dive

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-02-25 20:07:43 -08:00
parent 03eef5b0c2
commit 3afc4528b3

View file

@ -787,7 +787,7 @@ void DivePlannerPointsModel::createTemporaryPlan()
divedatapoint p = at(i); divedatapoint p = at(i);
int deltaT = lastIndex != -1 ? p.time - at(lastIndex).time : p.time; int deltaT = lastIndex != -1 ? p.time - at(lastIndex).time : p.time;
lastIndex = i; lastIndex = i;
if (i == 0 && prefs.drop_stone_mode) { if (i == 0 && mode == PLAN && prefs.drop_stone_mode) {
/* Okay, we add a first segment where we go down to depth */ /* Okay, we add a first segment where we go down to depth */
plan_add_segment(&diveplan, p.depth / prefs.descrate, p.depth, p.cylinderid, p.setpoint, true); plan_add_segment(&diveplan, p.depth / prefs.descrate, p.depth, p.cylinderid, p.setpoint, true);
deltaT -= p.depth / prefs.descrate; deltaT -= p.depth / prefs.descrate;