diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f5d6e9ea..44be2c7c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ desktop: add a button linking to the 'Contribute' page +mobile: fix configuration of decompression ceiling and gradient factors desktop: fix gas switches in UDDF exports core: allow of up to 6 O2 sensors (and corresponding voting logic) desktop: add divemode as a possible dive list column diff --git a/core/dive.c b/core/dive.c index 719e2b1ec..5b8e4cb43 100644 --- a/core/dive.c +++ b/core/dive.c @@ -3048,8 +3048,6 @@ void set_git_prefs(const char *prefs) { if (strstr(prefs, "TANKBAR")) git_prefs.tankbar = 1; - if (strstr(prefs, "DCCEILING")) - git_prefs.dcceiling = 1; if (strstr(prefs, "SHOW_SETPOINT")) git_prefs.show_ccr_setpoint = 1; if (strstr(prefs, "SHOW_SENSORS")) diff --git a/core/dive.h b/core/dive.h index eb35a08b3..65d9f1291 100644 --- a/core/dive.h +++ b/core/dive.h @@ -121,6 +121,8 @@ extern struct divecomputer *get_dive_dc(struct dive *dive, int nr); extern const struct divecomputer *get_dive_dc_const(const struct dive *dive, int nr); extern timestamp_t dive_endtime(const struct dive *dive); +extern void set_git_prefs(const char *prefs); + extern struct dive *make_first_dc(const struct dive *d, int dc_number); extern struct dive *clone_delete_divecomputer(const struct dive *d, int dc_number); void split_divecomputer(const struct dive *src, int num, struct dive **out1, struct dive **out2); diff --git a/core/pref.h b/core/pref.h index 741336036..b649ffc74 100644 --- a/core/pref.h +++ b/core/pref.h @@ -227,7 +227,6 @@ extern void subsurface_OS_pref_setup(); extern void copy_prefs(struct preferences *src, struct preferences *dest); extern void set_informational_units(const char *units); -extern void set_git_prefs(const char *prefs); #ifdef __cplusplus } diff --git a/mobile-widgets/qml/Settings.qml b/mobile-widgets/qml/Settings.qml index ed6a51972..e4f260054 100644 --- a/mobile-widgets/qml/Settings.qml +++ b/mobile-widgets/qml/Settings.qml @@ -628,9 +628,11 @@ TemplatePage { } } TemplateLabel { + enabled: PrefTechnicalDetails.calcceiling text: qsTr("GFLow") } TemplateSpinBox { + enabled: PrefTechnicalDetails.calcceiling id: gfLow from: 10 to: 150 @@ -645,9 +647,11 @@ TemplatePage { } } TemplateLabel { + enabled: PrefTechnicalDetails.calcceiling text: qsTr("GFHigh") } TemplateSpinBox { + enabled: PrefTechnicalDetails.calcceiling id: gfHigh from: 10 to: 150 diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index ed4016827..4bcce5f6d 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -405,7 +405,6 @@ void QMLManager::openLocalThenRemote(QString url) qPrefCloudStorage::set_cloud_verification_status(qPrefCloudStorage::CS_VERIFIED); qPrefUnits::set_unit_system(git_prefs.unit_system); qPrefTechnicalDetails::set_tankbar(git_prefs.tankbar); - qPrefTechnicalDetails::set_dcceiling(git_prefs.dcceiling); qPrefTechnicalDetails::set_show_ccr_setpoint(git_prefs.show_ccr_setpoint); qPrefTechnicalDetails::set_show_ccr_sensors(git_prefs.show_ccr_sensors); qPrefPartialPressureGas::set_po2(git_prefs.pp_graphs.po2); @@ -878,7 +877,6 @@ void QMLManager::consumeFinishedLoad() git_prefs.units = SI_units; prefs.units = git_prefs.units; prefs.tankbar = git_prefs.tankbar; - prefs.dcceiling = git_prefs.dcceiling; prefs.show_ccr_setpoint = git_prefs.show_ccr_setpoint; prefs.show_ccr_sensors = git_prefs.show_ccr_sensors; prefs.pp_graphs.po2 = git_prefs.pp_graphs.po2; diff --git a/profile-widget/profilescene.cpp b/profile-widget/profilescene.cpp index 211854746..ef083bd32 100644 --- a/profile-widget/profilescene.cpp +++ b/profile-widget/profilescene.cpp @@ -218,6 +218,11 @@ void ProfileScene::updateVisibility(bool diveHasHeartBeat, bool simplified) return; bool ppGraphs = ppGraphsEnabled(currentdc, simplified); + diveCeiling->setVisible(prefs.calcceiling); + for (DiveCalculatedTissue *tissue: allTissues) + tissue->setVisible(prefs.calcalltissues && prefs.calcceiling); + reportedCeiling->setVisible(prefs.dcceiling); + if (simplified) { pn2GasItem->setVisible(false); po2GasItem->setVisible(ppGraphs); @@ -231,6 +236,8 @@ void ProfileScene::updateVisibility(bool diveHasHeartBeat, bool simplified) ccrsensor2GasItem->setVisible(ppGraphs && prefs.show_ccr_sensors && (currentdc->no_o2sensors > 1)); ccrsensor3GasItem->setVisible(ppGraphs && prefs.show_ccr_sensors && (currentdc->no_o2sensors > 1)); ocpo2GasItem->setVisible((currentdc->divemode == PSCR) && prefs.show_scr_ocpo2); + // No point to show the gradient factor if we're not showing the calculated ceiling that is derived from it + decoModelParameters->setVisible(prefs.calcceiling); } else { pn2GasItem->setVisible(prefs.pp_graphs.pn2); po2GasItem->setVisible(prefs.pp_graphs.po2); @@ -246,15 +253,11 @@ void ProfileScene::updateVisibility(bool diveHasHeartBeat, bool simplified) heartBeatItem->setVisible(prefs.hrgraph && diveHasHeartBeat); - diveCeiling->setVisible(prefs.calcceiling); decoModelParameters->setVisible(prefs.decoinfo); - for (DiveCalculatedTissue *tissue: allTissues) - tissue->setVisible(prefs.calcalltissues && prefs.calcceiling); percentageItem->setVisible(prefs.percentagegraph); meanDepthItem->setVisible(prefs.show_average_depth); - reportedCeiling->setVisible(prefs.dcceiling); tankItem->setVisible(prefs.tankbar); temperatureItem->setVisible(true); }