From a700be32076225e68bfaa4b6c418cff015e2ceec Mon Sep 17 00:00:00 2001 From: willem ferguson Date: Tue, 20 Jan 2015 20:13:53 +0200 Subject: CCR option: display o2 sensor data This patch creates the possibility of viewing the individual sensor values when the po2 button on the profile toolbar is activated. This follows exactly the procedure for optionally displaying the setpoint values while viewing po2. A checkbox in the preferences panel determines whether sensor information is shown. By default it is set to OFF. When checked, and the po2 button is activated, sensor1 values are shown in grey, sensor2 in blue and sensor3 in brown. Signed-off-by: willem ferguson Signed-off-by: Dirk Hohndel --- qt-ui/preferences.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-ui/preferences.cpp') diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index 6c4e65df8..92c46f75b 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -124,6 +124,7 @@ void PreferencesDialog::setUiFromPrefs() ui.gfhigh->setValue(prefs.gfhigh); ui.gf_low_at_maxdepth->setChecked(prefs.gf_low_at_maxdepth); ui.show_ccr_setpoint->setChecked(prefs.show_ccr_setpoint); + ui.show_ccr_sensors->setChecked(prefs.show_ccr_sensors); ui.defaultSetpoint->setValue((double)prefs.defaultsetpoint / 1000.0); ui.psro2rate->setValue(prefs.o2consumption / 1000.0); ui.pscrfactor->setValue(rint(1000.0 / prefs.pscr_ratio)); @@ -279,6 +280,7 @@ void PreferencesDialog::syncSettings() SAVE_OR_REMOVE("gfhigh", default_prefs.gfhigh, ui.gfhigh->value()); SAVE_OR_REMOVE("gf_low_at_maxdepth", default_prefs.gf_low_at_maxdepth, ui.gf_low_at_maxdepth->isChecked()); SAVE_OR_REMOVE("show_ccr_setpoint", default_prefs.show_ccr_setpoint, ui.show_ccr_setpoint->isChecked()); + SAVE_OR_REMOVE("show_ccr_sensors", default_prefs.show_ccr_sensors, ui.show_ccr_sensors->isChecked()); SAVE_OR_REMOVE("display_unused_tanks", default_prefs.display_unused_tanks, ui.display_unused_tanks->isChecked()); SAVE_OR_REMOVE("show_average_depth", default_prefs.show_average_depth, ui.show_average_depth->isChecked()); s.endGroup(); @@ -396,6 +398,7 @@ void PreferencesDialog::loadSettings() GET_INT("gfhigh", gfhigh); GET_BOOL("gf_low_at_maxdepth", gf_low_at_maxdepth); GET_BOOL("show_ccr_setpoint",show_ccr_setpoint); + GET_BOOL("show_ccr_sensors",show_ccr_sensors); GET_BOOL("zoomed_plot", zoomed_plot); set_gf(prefs.gflow, prefs.gfhigh, prefs.gf_low_at_maxdepth); GET_BOOL("show_sac", show_sac); -- cgit v1.2.3-70-g09d2