summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-06-25 14:33:04 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-25 20:53:05 +0800
commitc7231adde1cddc64dfa47450393e97afa6c39d0f (patch)
tree37ece78ae1d0bbe98e2a18e16019b3f0eef4e94f /qt-ui/diveplanner.cpp
parentf2afddf4adf4d84a01d1331e9b26fda6129edc1c (diff)
downloadsubsurface-c7231adde1cddc64dfa47450393e97afa6c39d0f.tar.gz
Connect prefs.descrate to drop_stone_mode points
This enables so we can change the decent speed for drop like a stone mode. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index bc61233d5..1ba00a7f9 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -648,7 +648,7 @@ void DivePlannerPointsModel::setDropStoneMode(bool value)
beginInsertRows(QModelIndex(), 0, 0);
/* Copy the first current point */
divedatapoint p = divepoints.at(0);
- p.time = p.depth / 300;
+ p.time = p.depth / prefs.descrate;
divepoints.push_front(p);
endInsertRows();
}
@@ -934,9 +934,8 @@ void DivePlannerPointsModel::createTemporaryPlan()
lastIndex = i;
if (i == 0 && drop_stone_mode) {
/* Okay, we add a fist segment where we go down to depth */
- /* FIXME: make this configurable, now hard-coded to 18 m/s */
- plan_add_segment(&diveplan, p.depth / 300, p.depth, p.gasmix, p.po2, false);
- deltaT -= p.depth / 300;
+ plan_add_segment(&diveplan, p.depth / prefs.descrate, p.depth, p.gasmix, p.po2, false);
+ deltaT -= p.depth / prefs.descrate;
}
if (p.entered)
plan_add_segment(&diveplan, deltaT, p.depth, p.gasmix, p.po2, true);