summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/planner.c6
-rw-r--r--desktop-widgets/diveplanner.cpp16
2 files changed, 19 insertions, 3 deletions
diff --git a/core/planner.c b/core/planner.c
index ab4ba2dd2..4d66858e4 100644
--- a/core/planner.c
+++ b/core/planner.c
@@ -892,11 +892,11 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
translate("gettextFromC", "Warning:"),
translate("gettextFromC", "not enough reserve for gas sharing on ascent!"));
- /* Do and print minimum gas calculation for last bottom gas, but only for OC mode */
- /* and if no other warning was set before. */
+ /* Do and print minimum gas calculation for last bottom gas, but only for OC mode, */
+ /* not for recreational mode and if no other warning was set before. */
else
if (lastbottomdp && gasidx == lastbottomdp->cylinderid
- && dive->dc.divemode == OC) {
+ && dive->dc.divemode == OC && decoMode() != RECREATIONAL) {
/* Calculate minimum gas volume. */
volume_t mingasv;
mingasv.mliter = prefs.problemsolvingtime * prefs.bottomsac * prefs.sacfactor / 100.0
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index 804ea89e1..82b83c3ad 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -253,6 +253,14 @@ void PlannerSettingsWidget::disableDecoElements(int mode)
ui.vpmb_conservatism->setDisabled(true);
ui.switch_at_req_stop->setDisabled(true);
ui.min_switch_duration->setDisabled(true);
+ ui.sacfactor->setDisabled(true);
+ ui.problemsolvingtime->setDisabled(true);
+ ui.sacfactor->blockSignals(true);
+ ui.problemsolvingtime->blockSignals(true);
+ ui.sacfactor->setValue(2.0);
+ ui.problemsolvingtime->setValue(0);
+ ui.sacfactor->blockSignals(false);
+ ui.problemsolvingtime->blockSignals(false);
}
else if (mode == VPMB) {
ui.gflow->setDisabled(true);
@@ -265,6 +273,10 @@ void PlannerSettingsWidget::disableDecoElements(int mode)
ui.vpmb_conservatism->setDisabled(false);
ui.switch_at_req_stop->setDisabled(false);
ui.min_switch_duration->setDisabled(false);
+ ui.sacfactor->setDisabled(false);
+ ui.problemsolvingtime->setDisabled(false);
+ ui.sacfactor->setValue(prefs.sacfactor / 100.0);
+ ui.problemsolvingtime->setValue(prefs.problemsolvingtime);
}
else if (mode == BUEHLMANN) {
ui.gflow->setDisabled(false);
@@ -277,6 +289,10 @@ void PlannerSettingsWidget::disableDecoElements(int mode)
ui.vpmb_conservatism->setDisabled(true);
ui.switch_at_req_stop->setDisabled(false);
ui.min_switch_duration->setDisabled(false);
+ ui.sacfactor->setDisabled(false);
+ ui.problemsolvingtime->setDisabled(false);
+ ui.sacfactor->setValue(prefs.sacfactor / 100.0);
+ ui.problemsolvingtime->setValue(prefs.problemsolvingtime);
}
}