mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Enable the configuration of more OSTC settings
This enables enables you to configure a couple more settings in the OSTC devices, roughly corresponding to the new ones that can be configured in the OSTC3 devices. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
37953d163e
commit
9212458f23
3 changed files with 118 additions and 47 deletions
|
@ -1131,6 +1131,10 @@ static dc_status_t read_ostc_settings(dc_device_t *device, DeviceDetails *m_devi
|
|||
m_deviceDetails->gfLow = read_ostc_cf(data, 32);
|
||||
// CF33: Gradient Factor high
|
||||
m_deviceDetails->gfHigh = read_ostc_cf(data, 33);
|
||||
// CF56: Bottom gas consumption
|
||||
m_deviceDetails->bottomGasConsumption = read_ostc_cf(data, 56);
|
||||
// CF57: Ascent gas consumption
|
||||
m_deviceDetails->decoGasConsumption = read_ostc_cf(data, 57);
|
||||
// CF58: Future time to surface setFutureTTS
|
||||
m_deviceDetails->futureTTS = read_ostc_cf(data, 58);
|
||||
|
||||
|
@ -1150,6 +1154,8 @@ static dc_status_t read_ostc_settings(dc_device_t *device, DeviceDetails *m_devi
|
|||
// 32 custom Functions (CF 64-95)
|
||||
|
||||
// Decode the relevant ones
|
||||
// CF60: Graphic velocity
|
||||
m_deviceDetails->graphicalSpeedIndicator = read_ostc_cf(data, 60);
|
||||
// CF65: Show safety stop
|
||||
m_deviceDetails->safetyStop = read_ostc_cf(data, 65);
|
||||
// CF67: Alternaitve Gradient Factor low
|
||||
|
@ -1416,6 +1422,10 @@ static dc_status_t write_ostc_settings(dc_device_t *device, DeviceDetails *m_dev
|
|||
write_ostc_cf(data, 32, max_CF, m_deviceDetails->gfLow);
|
||||
// CF33: Gradient Factor high
|
||||
write_ostc_cf(data, 33, max_CF, m_deviceDetails->gfHigh);
|
||||
// CF56: Bottom gas consumption
|
||||
write_ostc_cf(data, 56, max_CF, m_deviceDetails->bottomGasConsumption);
|
||||
// CF57: Ascent gas consumption
|
||||
write_ostc_cf(data, 57, max_CF, m_deviceDetails->decoGasConsumption);
|
||||
// CF58: Future time to surface setFutureTTS
|
||||
write_ostc_cf(data, 58, max_CF, m_deviceDetails->futureTTS);
|
||||
#ifdef DEBUG_OSTC_CF
|
||||
|
@ -1437,6 +1447,8 @@ static dc_status_t write_ostc_settings(dc_device_t *device, DeviceDetails *m_dev
|
|||
// 32 custom Functions (CF 64-95)
|
||||
|
||||
// Decode the relevant ones
|
||||
// CF60: Graphic velocity
|
||||
write_ostc_cf(data, 60, max_CF, m_deviceDetails->graphicalSpeedIndicator);
|
||||
// CF65: Show safety stop
|
||||
write_ostc_cf(data, 65, max_CF, m_deviceDetails->safetyStop);
|
||||
// CF67: Alternaitve Gradient Factor low
|
||||
|
|
|
@ -566,6 +566,9 @@ void ConfigureDiveComputerDialog::populateDeviceDetailsOSTC()
|
|||
deviceDetails->aGFSelectable = ui.aGFSelectableCheckBox_3->isChecked();
|
||||
deviceDetails->aGFHigh = ui.aGFHighSpinBox_3->value();
|
||||
deviceDetails->aGFLow = ui.aGFLowSpinBox_3->value();
|
||||
deviceDetails->bottomGasConsumption = ui.bottomGasConsumption_3->value();
|
||||
deviceDetails->decoGasConsumption = ui.decoGasConsumption_3->value();
|
||||
deviceDetails->graphicalSpeedIndicator = ui.graphicalSpeedIndicator_3->isChecked();
|
||||
|
||||
//set gas values
|
||||
gas gas1;
|
||||
|
@ -932,6 +935,9 @@ setNumberOfDives
|
|||
ui.aGFHighSpinBox_3->setValue(deviceDetails->aGFHigh);
|
||||
ui.aGFLowSpinBox_3->setValue(deviceDetails->aGFLow);
|
||||
ui.numberOfDivesSpinBox_3->setValue(deviceDetails->numberOfDives);
|
||||
ui.bottomGasConsumption_3->setValue(deviceDetails->bottomGasConsumption);
|
||||
ui.decoGasConsumption_3->setValue(deviceDetails->decoGasConsumption);
|
||||
ui.graphicalSpeedIndicator_3->setChecked(deviceDetails->graphicalSpeedIndicator);
|
||||
|
||||
//load gas 1 values
|
||||
ui.ostcGasTable->setItem(0, 1, new QTableWidgetItem(QString::number(deviceDetails->gas1.oxygen)));
|
||||
|
|
|
@ -1954,14 +1954,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_49">
|
||||
<property name="text">
|
||||
<string>Future TTS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="3">
|
||||
<item row="10" column="3">
|
||||
<widget class="QLabel" name="label_53">
|
||||
<property name="text">
|
||||
<string>Desaturation</string>
|
||||
|
@ -1971,7 +1964,14 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="4">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_49">
|
||||
<property name="text">
|
||||
<string>Future TTS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="4">
|
||||
<widget class="QSpinBox" name="desaturationSpinBox_3">
|
||||
<property name="suffix">
|
||||
<string>%</string>
|
||||
|
@ -1987,7 +1987,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<item row="15" column="0">
|
||||
<spacer name="verticalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
@ -2020,35 +2020,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="futureTTSSpinBox_3">
|
||||
<property name="suffix">
|
||||
<string> min</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>9</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QSpinBox" name="aGFLowSpinBox_3">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string>%</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="decoTypeComboBox_3">
|
||||
<property name="currentIndex">
|
||||
|
@ -2091,6 +2062,35 @@
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="futureTTSSpinBox_3">
|
||||
<property name="suffix">
|
||||
<string> min</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>9</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QSpinBox" name="aGFLowSpinBox_3">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string>%</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_55">
|
||||
<property name="text">
|
||||
|
@ -2101,7 +2101,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="4">
|
||||
<item row="9" column="4">
|
||||
<widget class="QSpinBox" name="saturationSpinBox_3">
|
||||
<property name="suffix">
|
||||
<string>%</string>
|
||||
|
@ -2150,7 +2150,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="3">
|
||||
<item row="9" column="3">
|
||||
<widget class="QLabel" name="label_56">
|
||||
<property name="text">
|
||||
<string>Saturation</string>
|
||||
|
@ -2160,6 +2160,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="label_52">
|
||||
<property name="text">
|
||||
<string>GFHigh</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QSpinBox" name="gfLowSpinBox_3">
|
||||
<property name="suffix">
|
||||
|
@ -2176,6 +2183,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_51">
|
||||
<property name="text">
|
||||
<string>GFLow</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QSpinBox" name="gfHighSpinBox_3">
|
||||
<property name="suffix">
|
||||
|
@ -2192,17 +2206,56 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="label_52">
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="graphicalSpeedIndicator_3">
|
||||
<property name="text">
|
||||
<string>GFHigh</string>
|
||||
<string>Graphical speed indicator</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_51">
|
||||
<item row="12" column="4">
|
||||
<widget class="QSpinBox" name="decoGasConsumption_3">
|
||||
<property name="suffix">
|
||||
<string> l/m</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="4">
|
||||
<widget class="QSpinBox" name="bottomGasConsumption_3">
|
||||
<property name="suffix">
|
||||
<string> l/m</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="3">
|
||||
<widget class="QLabel" name="label_50">
|
||||
<property name="text">
|
||||
<string>GFLow</string>
|
||||
<string>Bottom gas consumption</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="3">
|
||||
<widget class="QLabel" name="label_59">
|
||||
<property name="text">
|
||||
<string>Deco gas consumption</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Add table
Reference in a new issue