From 451293f1a08b34c056d0db16b9050c1b7e4df295 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Fri, 22 Jan 2016 14:17:50 +0100 Subject: configure OSTC/OSTC3: Add safety stop parameters This adds the configure parameters for safety stops on the hwOS(OSTC3) and OSTC computers. Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- desktop-widgets/configuredivecomputerdialog.cpp | 16 + desktop-widgets/configuredivecomputerdialog.ui | 706 ++++++++++++++++++------ 2 files changed, 549 insertions(+), 173 deletions(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/configuredivecomputerdialog.cpp b/desktop-widgets/configuredivecomputerdialog.cpp index 3fbb4327c..8df184788 100644 --- a/desktop-widgets/configuredivecomputerdialog.cpp +++ b/desktop-widgets/configuredivecomputerdialog.cpp @@ -471,6 +471,10 @@ void ConfigureDiveComputerDialog::populateDeviceDetailsOSTC3() deviceDetails->graphicalSpeedIndicator = ui.graphicalSpeedIndicator->isChecked(); 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(); //set gas values gas gas1; @@ -600,6 +604,10 @@ void ConfigureDiveComputerDialog::populateDeviceDetailsOSTC() deviceDetails->bottomGasConsumption = ui.bottomGasConsumption_3->value(); 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(); //set gas values gas gas1; @@ -847,6 +855,10 @@ void ConfigureDiveComputerDialog::reloadValuesOSTC3() ui.graphicalSpeedIndicator->setChecked(deviceDetails->graphicalSpeedIndicator); 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); //load gas 1 values ui.ostc3GasTable->setItem(0, 1, new QTableWidgetItem(QString::number(deviceDetails->gas1.oxygen))); @@ -970,6 +982,10 @@ setNumberOfDives ui.bottomGasConsumption_3->setValue(deviceDetails->bottomGasConsumption); 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); //load gas 1 values ui.ostcGasTable->setItem(0, 1, new QTableWidgetItem(QString::number(deviceDetails->gas1.oxygen))); diff --git a/desktop-widgets/configuredivecomputerdialog.ui b/desktop-widgets/configuredivecomputerdialog.ui index ac177a277..a37b5ec39 100644 --- a/desktop-widgets/configuredivecomputerdialog.ui +++ b/desktop-widgets/configuredivecomputerdialog.ui @@ -253,6 +253,35 @@ Basic settings + + + + + Eco + + + + + Medium + + + + + High + + + + + + + + % + + + 5 + + + @@ -324,23 +353,6 @@ - - - - true - - - - - - - Language - - - languageComboBox - - - @@ -360,23 +372,21 @@ - - - - - Eco - - - - - Medium - - - - - High - - + + + + true + + + + + + + Language + + + languageComboBox + @@ -419,13 +429,13 @@ - - - - % + + + + false - - 5 + + Reset device to default settings @@ -479,7 +489,7 @@ - + Qt::Vertical @@ -492,13 +502,16 @@ - - - - false + + + + + 1 + 0 + - - Reset device to default settings + + 60 @@ -512,6 +525,13 @@ + + + + Computer model + + + @@ -522,26 +542,6 @@ - - - - - 1 - 0 - - - - 60 - - - - - - - Computer model - - - @@ -549,16 +549,6 @@ - - - - Dive mode - - - diveModeComboBox - - - @@ -583,13 +573,13 @@ - - + + - Sampling rate + Dive mode - samplingRateComboBox + diveModeComboBox @@ -607,13 +597,13 @@ - - + + - Dive mode color + Sampling rate - diveModeColour + samplingRateComboBox @@ -648,6 +638,16 @@ + + + + Dive mode color + + + diveModeColour + + + @@ -655,6 +655,122 @@ + + + + End Depth + + + + + + + false + + + s + + + 60 + + + 240 + + + 180 + + + + + + + Length + + + + + + + Start Depth + + + + + + + Reset Depth + + + + + + + false + + + m + + + 1 + + + 2.100000000000000 + + + 6.100000000000000 + + + 0.100000000000000 + + + 5.100000000000000 + + + + + + + false + + + m + + + 1 + + + 1.900000000000000 + + + 3.000000000000000 + + + 2.900000000000000 + + + + + + + false + + + m + + + 1 + + + 8.100000000000000 + + + 15.100000000000000 + + + 10.100000000000000 + + + @@ -1821,27 +1937,31 @@ Basic settings - - + + - Salinity + Serial No. - salinitySpinBox + serialNoLineEdit - - + + - Serial No. + Length - - serialNoLineEdit + + + + + + true - + @@ -1854,7 +1974,7 @@ - + Firmware version @@ -1864,37 +1984,126 @@ - - - - true + + + + Custom text + + + customTextLlineEdit_3 + + + + + + + + 1 + 0 + + + + 23 + + + + + + + Number of dives + + + + + + + Show safety stop + + + + + + + true + + + + + + + Sampling rate + + + samplingRateComboBox + + + + + + + + 0 + 0 + + + + 1 + + + 120 + + + 10 + + + + + + + Date format + + + dateFormatComboBox + + + + + + + + MM/DD/YY + + + + + DD/MM/YY + + + + + YY/MM/DD + + + + + + + + Sync dive computer time with PC - - + + - Custom text + Salinity - customTextLlineEdit_3 - - - - - - - - 1 - 0 - - - - 23 + salinitySpinBox - + kg/ℓ @@ -1910,7 +2119,7 @@ - + Qt::Vertical @@ -1923,89 +2132,112 @@ - - + + - Sync dive computer time with PC + Start Depth - - + + - Show safety stop + End Depth - - - - - MM/DD/YY - - - - - DD/MM/YY - - - - - YY/MM/DD - - - - - - + + - Number of dives + Reset Depth - - - - true + + + + false + + + s + + + 10 + + + 250 + + + 180 - - - - - 0 - 0 - + + + + false - + + m + + 1 + + 3.000000000000000 + - 120 + 6.500000000000000 + + + 0.100000000000000 - 10 + 5.100000000000000 - - - - Sampling rate + + + + false - - samplingRateComboBox + + m + + + 1 + + + 2.500000000000000 + + + 5.000000000000000 + + + 2.900000000000000 - - - - Date format + + + + false - - dateFormatComboBox + + m + + + 1 + + + 7.500000000000000 + + + 20.100000000000001 + + + 10.100000000000000 @@ -2780,5 +3012,133 @@ + + safetyStopCheckBox + toggled(bool) + safetyStopLengthSpinBox + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox + toggled(bool) + safetyStopStartDepthDoubleSpinBox + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox + toggled(bool) + safetyStopEndDepthDoubleSpinBox + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox + toggled(bool) + safetyStopResetDepthDoubleSpinBox + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox_3 + toggled(bool) + safetyStopLengthSpinBox_3 + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox_3 + toggled(bool) + safetyStopStartDepthDoubleSpinBox_3 + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox_3 + toggled(bool) + safetyStopEndDepthDoubleSpinBox_3 + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox_3 + toggled(bool) + safetyStopResetDepthDoubleSpinBox_3 + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + -- cgit v1.2.3-70-g09d2