diff options
author | Rick Walsh <rickmwalsh@gmail.com> | 2016-07-06 22:40:31 +1000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-07-09 12:08:06 -0700 |
commit | 9fbd11744f1bfffbc6973e0f9483ae1630dd8722 (patch) | |
tree | 3b4873ba46e85fb5f61cb87ce103aba1285231ae /desktop-widgets/diveplanner.cpp | |
parent | 1ba61d7ad5025cf3bafc86705cf4c174aef8c264 (diff) | |
download | subsurface-9fbd11744f1bfffbc6973e0f9483ae1630dd8722.tar.gz |
Add function to calculate gas maximum narcotic depth
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/diveplanner.cpp')
-rw-r--r-- | desktop-widgets/diveplanner.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index 7ac88f9bc..31dd4bb93 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -291,7 +291,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) prefs.descrate = s.value("descrate", prefs.descrate).toInt(); prefs.bottompo2 = s.value("bottompo2", prefs.bottompo2).toInt(); prefs.decopo2 = s.value("decopo2", prefs.decopo2).toInt(); - prefs.bestmixend = s.value("bestmixend", prefs.bestmixend).toInt(); + prefs.bestmixend.mm = s.value("bestmixend", prefs.bestmixend.mm).toInt(); prefs.doo2breaks = s.value("doo2breaks", prefs.doo2breaks).toBool(); prefs.switch_at_req_stop = s.value("switch_at_req_stop", prefs.switch_at_req_stop).toBool(); prefs.min_switch_duration = s.value("min_switch_duration", prefs.min_switch_duration).toInt(); @@ -385,7 +385,7 @@ void PlannerSettingsWidget::updateUnitsUI() ui.ascRateStops->setValue(rint(prefs.ascratestops / UNIT_FACTOR)); ui.ascRateLast6m->setValue(rint(prefs.ascratelast6m / UNIT_FACTOR)); ui.descRate->setValue(rint(prefs.descrate / UNIT_FACTOR)); - ui.bestmixEND->setValue(rint(get_depth_units(prefs.bestmixend, NULL, NULL))); + ui.bestmixEND->setValue(rint(get_depth_units(prefs.bestmixend.mm, NULL, NULL))); } PlannerSettingsWidget::~PlannerSettingsWidget() @@ -406,7 +406,7 @@ PlannerSettingsWidget::~PlannerSettingsWidget() s.setValue("descrate", prefs.descrate); s.setValue("bottompo2", prefs.bottompo2); s.setValue("decopo2", prefs.decopo2); - s.setValue("bestmixend", prefs.bestmixend); + s.setValue("bestmixend", prefs.bestmixend.mm); s.setValue("doo2breaks", prefs.doo2breaks); s.setValue("drop_stone_mode", prefs.drop_stone_mode); s.setValue("switch_at_req_stop", prefs.switch_at_req_stop); @@ -522,7 +522,7 @@ void PlannerSettingsWidget::setDecoPo2(double po2) void PlannerSettingsWidget::setBestmixEND(int depth) { - prefs.bestmixend = units_to_depth(depth); + prefs.bestmixend.mm = units_to_depth(depth); } void PlannerSettingsWidget::setBackgasBreaks(bool dobreaks) |