summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2016-03-18 14:57:30 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-18 09:52:43 -0700
commitab1dc3ce387a9ef2cf4599a3738508c5b4f0d09f (patch)
tree537fdffbff55bc8918cdf6ee352aeff1bacab042 /qt-ui
parent122088c8911397cdcb3099aaa14d10f47275664c (diff)
downloadsubsurface-ab1dc3ce387a9ef2cf4599a3738508c5b4f0d09f.tar.gz
configure OSTC/OSTC3: Bugfix depth parameter unit
The unit for the depth parameters ain't meters, its 0.1 meters. This caused the values stored to be out of range. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/configuredivecomputerdialog.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
index 8df184788..4205679d6 100644
--- a/qt-ui/configuredivecomputerdialog.cpp
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -472,9 +472,9 @@ void ConfigureDiveComputerDialog::populateDeviceDetailsOSTC3()
deviceDetails->alwaysShowppO2 = ui.alwaysShowppO2->isChecked();
deviceDetails->tempSensorOffset = ui.tempSensorOffsetDoubleSpinBox->value() * 10;
deviceDetails->safetyStopLength = ui.safetyStopLengthSpinBox->value();
- deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox->value();
- deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox->value();
- deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox->value();
+ deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox->value() * 10;
+ deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox->value() * 10;
+ deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox->value() * 10;
//set gas values
gas gas1;
@@ -605,9 +605,9 @@ void ConfigureDiveComputerDialog::populateDeviceDetailsOSTC()
deviceDetails->decoGasConsumption = ui.decoGasConsumption_3->value();
deviceDetails->graphicalSpeedIndicator = ui.graphicalSpeedIndicator_3->isChecked();
deviceDetails->safetyStopLength = ui.safetyStopLengthSpinBox_3->value();
- deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox_3->value();
- deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox_3->value();
- deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox_3->value();
+ deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox_3->value() * 10;
+ deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox_3->value() * 10;
+ deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox_3->value() * 10;
//set gas values
gas gas1;
@@ -856,9 +856,9 @@ void ConfigureDiveComputerDialog::reloadValuesOSTC3()
ui.alwaysShowppO2->setChecked(deviceDetails->alwaysShowppO2);
ui.tempSensorOffsetDoubleSpinBox->setValue((double)deviceDetails->tempSensorOffset / 10.0);
ui.safetyStopLengthSpinBox->setValue(deviceDetails->safetyStopLength);
- ui.safetyStopStartDepthDoubleSpinBox->setValue(deviceDetails->safetyStopStartDepth);
- ui.safetyStopEndDepthDoubleSpinBox->setValue(deviceDetails->safetyStopEndDepth);
- ui.safetyStopResetDepthDoubleSpinBox->setValue(deviceDetails->safetyStopResetDepth);
+ ui.safetyStopStartDepthDoubleSpinBox->setValue(deviceDetails->safetyStopStartDepth / 10.0);
+ ui.safetyStopEndDepthDoubleSpinBox->setValue(deviceDetails->safetyStopEndDepth / 10.0);
+ ui.safetyStopResetDepthDoubleSpinBox->setValue(deviceDetails->safetyStopResetDepth / 10.0);
//load gas 1 values
ui.ostc3GasTable->setItem(0, 1, new QTableWidgetItem(QString::number(deviceDetails->gas1.oxygen)));
@@ -983,9 +983,9 @@ setNumberOfDives
ui.decoGasConsumption_3->setValue(deviceDetails->decoGasConsumption);
ui.graphicalSpeedIndicator_3->setChecked(deviceDetails->graphicalSpeedIndicator);
ui.safetyStopLengthSpinBox_3->setValue(deviceDetails->safetyStopLength);
- ui.safetyStopStartDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopStartDepth);
- ui.safetyStopEndDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopEndDepth);
- ui.safetyStopResetDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopResetDepth);
+ ui.safetyStopStartDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopStartDepth / 10.0);
+ ui.safetyStopEndDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopEndDepth / 10.0);
+ ui.safetyStopResetDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopResetDepth / 10.0);
//load gas 1 values
ui.ostcGasTable->setItem(0, 1, new QTableWidgetItem(QString::number(deviceDetails->gas1.oxygen)));