summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/configuredivecomputer.cpp24
-rw-r--r--qt-ui/configuredivecomputerdialog.cpp14
-rw-r--r--qt-ui/configuredivecomputerdialog.ui259
-rw-r--r--qt-ui/configuredivecomputerthreads.cpp61
-rw-r--r--qt-ui/devicedetails.cpp389
-rw-r--r--qt-ui/devicedetails.h148
6 files changed, 851 insertions, 44 deletions
diff --git a/qt-ui/configuredivecomputer.cpp b/qt-ui/configuredivecomputer.cpp
index 72f2427d4..c88534e9f 100644
--- a/qt-ui/configuredivecomputer.cpp
+++ b/qt-ui/configuredivecomputer.cpp
@@ -61,9 +61,15 @@ bool ConfigureDiveComputer::saveXMLBackup(QString fileName, DeviceDetails *detai
xml += "\n</DiveComputer>";
xml += "\n<Settings>";
xml += addSettingToXML("CustomText", details->customText());
+ xml += addSettingToXML("LastDeco", details->lastDeco());
xml += addSettingToXML("Brightness", details->brightness());
+ xml += addSettingToXML("Units", details->units());
+ xml += addSettingToXML("SamplingRate", details->samplingRate());
+ xml += addSettingToXML("Salinity", details->salinity());
+ xml += addSettingToXML("DiveModeColor", details->diveModeColor());
xml += addSettingToXML("Language", details->language());
xml += addSettingToXML("DateFormat", details->dateFormat());
+ xml += addSettingToXML("CompassGain", details->compassGain());
xml += "\n</Settings>";
xml += "\n</DiveComputerSettingsBackup>";
QFile file(fileName);
@@ -120,14 +126,32 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
if (settingName == "CustomText")
details->setCustomText(keyString);
+ if (settingName == "LastDeco")
+ details->setLastDeco(keyString.toInt());
+
if (settingName == "Brightness")
details->setBrightness(keyString.toInt());
+ if (settingName == "Units")
+ details->setUnits(keyString.toInt());
+
+ if (settingName == "SamplingRate")
+ details->setSamplingRate(keyString.toInt());
+
+ if (settingName == "Salinity")
+ details->setSalinity(keyString.toInt());
+
+ if (settingName == "DiveModeColour")
+ details->setDiveModeColor(keyString.toInt());
+
if (settingName == "Language")
details->setLanguage(keyString.toInt());
if (settingName == "DateFormat")
details->setDateFormat(keyString.toInt());
+
+ if (settingName == "CompassGain")
+ details->setCompassGain(keyString.toInt());
}
settingNode = settingNode->next;
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
index 2f8771ed7..c50306f1a 100644
--- a/qt-ui/configuredivecomputerdialog.cpp
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -127,10 +127,16 @@ void ConfigureDiveComputerDialog::fill_device_list(int dc_type)
void ConfigureDiveComputerDialog::populateDeviceDetails()
{
+ deviceDetails->setCustomText(ui->customTextLlineEdit->text());
+ deviceDetails->setLastDeco(ui->lastDecoSpinBox->value());
deviceDetails->setBrightness(ui->brightnessComboBox->currentIndex());
+ deviceDetails->setUnits(ui->unitsComboBox->currentIndex());
+ deviceDetails->setSamplingRate(ui->samplingRateComboBox->currentIndex());
+ deviceDetails->setSalinity(ui->salinitySpinBox->value());
+ deviceDetails->setDiveModeColor(ui->diveModeColour->currentIndex());
deviceDetails->setLanguage(ui->languageComboBox->currentIndex());
deviceDetails->setDateFormat(ui->dateFormatComboBox->currentIndex());
- deviceDetails->setCustomText(ui->customTextLlineEdit->text());
+ deviceDetails->setCompassGain(ui->compassGainComboBox->currentIndex());
deviceDetails->setSyncTime(ui->dateTimeSyncCheckBox->isChecked());
}
@@ -224,9 +230,15 @@ void ConfigureDiveComputerDialog::reloadValues()
ui->serialNoLineEdit->setText(deviceDetails->serialNo());
ui->firmwareVersionLineEdit->setText(deviceDetails->firmwareVersion());
ui->customTextLlineEdit->setText(deviceDetails->customText());
+ ui->lastDecoSpinBox->setValue(deviceDetails->lastDeco());
ui->brightnessComboBox->setCurrentIndex(deviceDetails->brightness());
+ ui->unitsComboBox->setCurrentIndex(deviceDetails->units());
+ ui->samplingRateComboBox->setCurrentIndex(deviceDetails->samplingRate());
+ ui->salinitySpinBox->setValue(deviceDetails->salinity());
+ ui->diveModeColour->setCurrentIndex(deviceDetails->diveModeColor());
ui->languageComboBox->setCurrentIndex(deviceDetails->language());
ui->dateFormatComboBox->setCurrentIndex(deviceDetails->dateFormat());
+ ui->compassGainComboBox->setCurrentIndex(deviceDetails->compassGain());
}
diff --git a/qt-ui/configuredivecomputerdialog.ui b/qt-ui/configuredivecomputerdialog.ui
index 4fb731a3c..e117db644 100644
--- a/qt-ui/configuredivecomputerdialog.ui
+++ b/qt-ui/configuredivecomputerdialog.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>472</width>
- <height>472</height>
+ <width>629</width>
+ <height>496</height>
</rect>
</property>
<property name="windowTitle">
@@ -77,6 +77,13 @@
</widget>
</item>
<item>
+ <widget class="QPushButton" name="saveSettingsPushButton">
+ <property name="text">
+ <string>Save Chages to Device</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -107,24 +114,55 @@
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2">
- <item row="3" column="0">
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>Custom Text:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="label_12">
+ <property name="text">
+ <string>Sampling Rate:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Brightness:</string>
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_7">
+ <item row="5" column="2">
+ <widget class="QLabel" name="label_13">
<property name="text">
- <string>Serial No.</string>
+ <string>Salinity (0-5%):</string>
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_5">
+ <item row="7" column="0" colspan="3">
+ <widget class="QCheckBox" name="dateTimeSyncCheckBox">
<property name="text">
- <string>Custom Text:</string>
+ <string>Sync dive computer time with PC</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="3">
+ <widget class="QSpinBox" name="salinitySpinBox">
+ <property name="suffix">
+ <string>%</string>
+ </property>
+ <property name="maximum">
+ <number>5</number>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QSpinBox" name="lastDecoSpinBox">
+ <property name="suffix">
+ <string> m</string>
</property>
</widget>
</item>
@@ -135,17 +173,42 @@
</property>
</widget>
</item>
- <item row="4" column="0">
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_10">
+ <property name="text">
+ <string>Last Deco:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_7">
+ <property name="text">
+ <string>Serial No.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Language:</string>
</property>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QLineEdit" name="customTextLlineEdit"/>
+ <item row="4" column="3">
+ <widget class="QComboBox" name="unitsComboBox">
+ <item>
+ <property name="text">
+ <string>m/°C</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>ft/°F</string>
+ </property>
+ </item>
+ </widget>
</item>
- <item row="3" column="1">
+ <item row="3" column="3">
<widget class="QComboBox" name="brightnessComboBox">
<item>
<property name="text">
@@ -164,14 +227,26 @@
</item>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string>Firmware Version:</string>
- </property>
+ <item row="4" column="1">
+ <widget class="QComboBox" name="dateFormatComboBox">
+ <item>
+ <property name="text">
+ <string>MMDDYY</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>DDMMYY</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>YYMMDD</string>
+ </property>
+ </item>
</widget>
</item>
- <item row="4" column="1">
+ <item row="2" column="3">
<widget class="QComboBox" name="languageComboBox">
<item>
<property name="text">
@@ -195,44 +270,144 @@
</item>
</widget>
</item>
- <item row="5" column="0">
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="firmwareVersionLineEdit">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Date Format:</string>
</property>
</widget>
</item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>Firmware Version:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="customTextLlineEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="2">
+ <widget class="QLabel" name="label_11">
+ <property name="text">
+ <string>Units:</string>
+ </property>
+ </widget>
+ </item>
<item row="5" column="1">
- <widget class="QComboBox" name="dateFormatComboBox">
+ <widget class="QComboBox" name="samplingRateComboBox">
<item>
<property name="text">
- <string>MMDDYY</string>
+ <string>2s</string>
</property>
</item>
<item>
<property name="text">
- <string>DDMMYY</string>
+ <string>10s</string>
</property>
</item>
+ </widget>
+ </item>
+ <item row="6" column="0">
+ <widget class="QLabel" name="label_14">
+ <property name="text">
+ <string>Dive Mode Colour:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1">
+ <widget class="QComboBox" name="diveModeColour">
<item>
<property name="text">
- <string>YYMMDD</string>
+ <string>Standard</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Red</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Green</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Blue</string>
</property>
</item>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="firmwareVersionLineEdit">
- <property name="readOnly">
- <bool>true</bool>
+ <item row="6" column="2">
+ <widget class="QLabel" name="label_15">
+ <property name="text">
+ <string>Compass Gain:</string>
</property>
</widget>
</item>
- <item row="6" column="1">
- <widget class="QCheckBox" name="dateTimeSyncCheckBox">
- <property name="text">
- <string>Sync dive computer time with PC</string>
+ <item row="6" column="3">
+ <widget class="QComboBox" name="compassGainComboBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
+ <item>
+ <property name="text">
+ <string>230LSB/Gauss</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>330LSB/Gauss</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>390LSB/Gauss</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>440LSB/Gauss</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>660LSB/Gauss</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>820LSB/Gauss</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>1090LSB/Gauss</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>1370LSB/Gauss</string>
+ </property>
+ </item>
</widget>
</item>
</layout>
@@ -270,13 +445,6 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
- <widget class="QPushButton" name="saveSettingsPushButton">
- <property name="text">
- <string>Save Chages to Device</string>
- </property>
- </widget>
- </item>
- <item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -306,12 +474,21 @@
<tabstop>device</tabstop>
<tabstop>search</tabstop>
<tabstop>retrieveDetails</tabstop>
+ <tabstop>backupButton</tabstop>
+ <tabstop>restoreBackupButton</tabstop>
<tabstop>serialNoLineEdit</tabstop>
<tabstop>firmwareVersionLineEdit</tabstop>
<tabstop>customTextLlineEdit</tabstop>
- <tabstop>brightnessComboBox</tabstop>
<tabstop>languageComboBox</tabstop>
- <tabstop>saveSettingsPushButton</tabstop>
+ <tabstop>lastDecoSpinBox</tabstop>
+ <tabstop>brightnessComboBox</tabstop>
+ <tabstop>dateFormatComboBox</tabstop>
+ <tabstop>unitsComboBox</tabstop>
+ <tabstop>samplingRateComboBox</tabstop>
+ <tabstop>salinitySpinBox</tabstop>
+ <tabstop>diveModeColour</tabstop>
+ <tabstop>compassGainComboBox</tabstop>
+ <tabstop>dateTimeSyncCheckBox</tabstop>
<tabstop>cancel</tabstop>
</tabstops>
<resources/>
diff --git a/qt-ui/configuredivecomputerthreads.cpp b/qt-ui/configuredivecomputerthreads.cpp
index bddced474..369640459 100644
--- a/qt-ui/configuredivecomputerthreads.cpp
+++ b/qt-ui/configuredivecomputerthreads.cpp
@@ -27,18 +27,47 @@ void ReadSettingsThread::run()
m_deviceDetails->setLanguage(0);
m_deviceDetails->setLastDeco(0);
m_deviceDetails->setSerialNo("");
+ m_deviceDetails->setCompassGain(0);
+ m_deviceDetails->setSalinity(0);
+ m_deviceDetails->setSamplingRate(0);
+ m_deviceDetails->setUnits(0);
+
//Read general settings
unsigned char uData[1] = {0};
+ //LastDeco
+ rc = hw_ostc3_device_config_read(m_data->device, 0x2D, uData, sizeof(uData));
+ if (rc == DC_STATUS_SUCCESS)
+ m_deviceDetails->setLastDeco(uData[0]);
+ //Brightness
rc = hw_ostc3_device_config_read(m_data->device, 0x2D, uData, sizeof(uData));
if (rc == DC_STATUS_SUCCESS)
m_deviceDetails->setBrightness(uData[0]);
+ //Units
+ rc = hw_ostc3_device_config_read(m_data->device, 0x2E, uData, sizeof(uData));
+ if (rc == DC_STATUS_SUCCESS)
+ m_deviceDetails->setUnits(uData[0]);
+ //Sampling Rate
+ rc = hw_ostc3_device_config_read(m_data->device, 0x2F, uData, sizeof(uData));
+ if (rc == DC_STATUS_SUCCESS)
+ m_deviceDetails->setSamplingRate(uData[0]);
+ //Salinity
+ rc = hw_ostc3_device_config_read(m_data->device, 0x30, uData, sizeof(uData));
+ if (rc == DC_STATUS_SUCCESS)
+ m_deviceDetails->setSalinity(uData[0]);
+ //Dive mode colour
+ rc = hw_ostc3_device_config_read(m_data->device, 0x31, uData, sizeof(uData));
+ if (rc == DC_STATUS_SUCCESS)
+ m_deviceDetails->setDiveModeColor(uData[0]);
+ //Language
rc = hw_ostc3_device_config_read(m_data->device, 0x32, uData, sizeof(uData));
if (rc == DC_STATUS_SUCCESS)
m_deviceDetails->setLanguage(uData[0]);
+ //Date Format
rc = hw_ostc3_device_config_read(m_data->device, 0x33, uData, sizeof(uData));
if (rc == DC_STATUS_SUCCESS)
m_deviceDetails->setDateFormat(uData[0]);
+
//read firmware settings
unsigned char fData[64] = {0};
rc = hw_ostc3_device_version (m_data->device, fData, sizeof (fData));
@@ -88,15 +117,47 @@ void WriteSettingsThread::run()
case DC_FAMILY_HW_OSTC3:
supported = true;
//write general settings
+
+ //custom text
hw_ostc3_device_customtext(m_data->device, m_deviceDetails->customText().toUtf8().data());
unsigned char data[1] = {0};
+
+ //last deco
+ data[0] = m_deviceDetails->lastDeco();
+ hw_ostc3_device_config_write(m_data->device, 0x2C, data, sizeof(data));
+
+ //brightness
data[0] = m_deviceDetails->brightness();
hw_ostc3_device_config_write(m_data->device, 0x2D, data, sizeof(data));
+
+ //units
+ data[0] = m_deviceDetails->units();
+ hw_ostc3_device_config_write(m_data->device, 0x2E, data, sizeof(data));
+
+ //sampling rate
+ data[0] = m_deviceDetails->samplingRate();
+ hw_ostc3_device_config_write(m_data->device, 0x2F, data, sizeof(data));
+
+ //salinity
+ data[0] = m_deviceDetails->salinity();
+ hw_ostc3_device_config_write(m_data->device, 0x30, data, sizeof(data));
+
+ //dive mode colour
+ data[0] = m_deviceDetails->diveModeColor();
+ hw_ostc3_device_config_write(m_data->device, 0x31, data, sizeof(data));
+
+ //language
data[0] = m_deviceDetails->language();
hw_ostc3_device_config_write(m_data->device, 0x32, data, sizeof(data));
+
+ //date format
data[0] = m_deviceDetails->dateFormat();
hw_ostc3_device_config_write(m_data->device, 0x33, data, sizeof(data));
+ //compass gain
+ data[0] = m_deviceDetails->compassGain();
+ hw_ostc3_device_config_write(m_data->device, 0x34, data, sizeof(data));
+
//sync date and time
if (m_deviceDetails->syncTime()) {
QDateTime timeToSet = QDateTime::currentDateTime();
diff --git a/qt-ui/devicedetails.cpp b/qt-ui/devicedetails.cpp
index 7d6212f18..db95cfd41 100644
--- a/qt-ui/devicedetails.cpp
+++ b/qt-ui/devicedetails.cpp
@@ -5,6 +5,7 @@ DeviceDetails::DeviceDetails(QObject *parent) :
{
}
+
device_data_t *DeviceDetails::data() const
{
return m_data;
@@ -14,6 +15,7 @@ void DeviceDetails::setData(device_data_t *data)
{
m_data = data;
}
+
QString DeviceDetails::serialNo() const
{
return m_serialNo;
@@ -23,6 +25,7 @@ void DeviceDetails::setSerialNo(const QString &serialNo)
{
m_serialNo = serialNo;
}
+
QString DeviceDetails::firmwareVersion() const
{
return m_firmwareVersion;
@@ -32,6 +35,7 @@ void DeviceDetails::setFirmwareVersion(const QString &firmwareVersion)
{
m_firmwareVersion = firmwareVersion;
}
+
QString DeviceDetails::customText() const
{
return m_customText;
@@ -41,6 +45,7 @@ void DeviceDetails::setCustomText(const QString &customText)
{
m_customText = customText;
}
+
int DeviceDetails::brightness() const
{
return m_brightness;
@@ -50,6 +55,7 @@ void DeviceDetails::setBrightness(int brightness)
{
m_brightness = brightness;
}
+
int DeviceDetails::diveModeColor() const
{
return m_diveModeColor;
@@ -59,6 +65,7 @@ void DeviceDetails::setDiveModeColor(int diveModeColor)
{
m_diveModeColor = diveModeColor;
}
+
int DeviceDetails::language() const
{
return m_language;
@@ -68,6 +75,7 @@ void DeviceDetails::setLanguage(int language)
{
m_language = language;
}
+
int DeviceDetails::dateFormat() const
{
return m_dateFormat;
@@ -77,6 +85,7 @@ void DeviceDetails::setDateFormat(int dateFormat)
{
m_dateFormat = dateFormat;
}
+
int DeviceDetails::lastDeco() const
{
return m_lastDeco;
@@ -86,6 +95,7 @@ void DeviceDetails::setLastDeco(int lastDeco)
{
m_lastDeco = lastDeco;
}
+
bool DeviceDetails::syncTime() const
{
return m_syncTime;
@@ -96,3 +106,382 @@ void DeviceDetails::setSyncTime(bool syncTime)
m_syncTime = syncTime;
}
+gas DeviceDetails::gas1() const
+{
+ return m_gas1;
+}
+
+void DeviceDetails::setGas1(const gas &gas1)
+{
+ m_gas1 = gas1;
+}
+
+gas DeviceDetails::gas2() const
+{
+ return m_gas2;
+}
+
+void DeviceDetails::setGas2(const gas &gas2)
+{
+ m_gas2 = gas2;
+}
+
+gas DeviceDetails::gas3() const
+{
+ return m_gas3;
+}
+
+void DeviceDetails::setGas3(const gas &gas3)
+{
+ m_gas3 = gas3;
+}
+
+gas DeviceDetails::gas4() const
+{
+ return m_gas4;
+}
+
+void DeviceDetails::setGas4(const gas &gas4)
+{
+ m_gas4 = gas4;
+}
+
+gas DeviceDetails::gas5() const
+{
+ return m_gas5;
+}
+
+void DeviceDetails::setGas5(const gas &gas5)
+{
+ m_gas5 = gas5;
+}
+
+gas DeviceDetails::dil1() const
+{
+ return m_dil1;
+}
+
+void DeviceDetails::setDil1(const gas &dil1)
+{
+ m_dil1 = dil1;
+}
+
+gas DeviceDetails::dil2() const
+{
+ return m_dil2;
+}
+
+void DeviceDetails::setDil2(const gas &dil2)
+{
+ m_dil2 = dil2;
+}
+
+gas DeviceDetails::dil3() const
+{
+ return m_dil3;
+}
+
+void DeviceDetails::setDil3(const gas &dil3)
+{
+ m_dil3 = dil3;
+}
+
+gas DeviceDetails::dil4() const
+{
+ return m_dil4;
+}
+
+void DeviceDetails::setDil4(const gas &dil4)
+{
+ m_dil4 = dil4;
+}
+
+gas DeviceDetails::dil5() const
+{
+ return m_dil5;
+}
+
+void DeviceDetails::setDil5(const gas &dil5)
+{
+ m_dil5 = dil5;
+}
+
+setpoint DeviceDetails::sp1() const
+{
+ return m_sp1;
+}
+
+void DeviceDetails::setSp1(const setpoint &sp1)
+{
+ m_sp1 = sp1;
+}
+
+setpoint DeviceDetails::sp2() const
+{
+ return m_sp2;
+}
+
+void DeviceDetails::setSp2(const setpoint &sp2)
+{
+ m_sp2 = sp2;
+}
+
+setpoint DeviceDetails::sp3() const
+{
+ return m_sp3;
+}
+
+void DeviceDetails::setSp3(const setpoint &sp3)
+{
+ m_sp3 = sp3;
+}
+
+setpoint DeviceDetails::sp4() const
+{
+ return m_sp4;
+}
+
+void DeviceDetails::setSp4(const setpoint &sp4)
+{
+ m_sp4 = sp4;
+}
+
+setpoint DeviceDetails::sp5() const
+{
+ return m_sp5;
+}
+
+void DeviceDetails::setSp5(const setpoint &sp5)
+{
+ m_sp5 = sp5;
+}
+
+int DeviceDetails::ccrMode() const
+{
+ return m_ccrMode;
+}
+
+void DeviceDetails::setCcrMode(int ccrMode)
+{
+ m_ccrMode = ccrMode;
+}
+
+int DeviceDetails::diveMode() const
+{
+ return m_diveMode;
+}
+
+void DeviceDetails::setDiveMode(int diveMode)
+{
+ m_diveMode = diveMode;
+}
+
+int DeviceDetails::decoType() const
+{
+ return m_decoType;
+}
+
+void DeviceDetails::setDecoType(int decoType)
+{
+ m_decoType = decoType;
+}
+
+int DeviceDetails::pp02Max() const
+{
+ return m_pp02Max;
+}
+
+void DeviceDetails::setPp02Max(int pp02Max)
+{
+ m_pp02Max = pp02Max;
+}
+
+int DeviceDetails::pp02Min() const
+{
+ return m_pp02Min;
+}
+
+void DeviceDetails::setPp02Min(int pp02Min)
+{
+ m_pp02Min = pp02Min;
+}
+
+int DeviceDetails::futureTTS() const
+{
+ return m_futureTTS;
+}
+
+void DeviceDetails::setFutureTTS(int futureTTS)
+{
+ m_futureTTS = futureTTS;
+}
+
+int DeviceDetails::gfLow() const
+{
+ return m_gfLow;
+}
+
+void DeviceDetails::setGfLow(int gfLow)
+{
+ m_gfLow = gfLow;
+}
+
+int DeviceDetails::gfHigh() const
+{
+ return m_gfHigh;
+}
+
+void DeviceDetails::setGfHigh(int gfHigh)
+{
+ m_gfHigh = gfHigh;
+}
+
+int DeviceDetails::aGFLow() const
+{
+ return m_aGFLow;
+}
+
+void DeviceDetails::setAGFLow(int aGFLow)
+{
+ m_aGFLow = aGFLow;
+}
+
+int DeviceDetails::aGFHigh() const
+{
+ return m_aGFHigh;
+}
+
+void DeviceDetails::setAGFHigh(int aGFHigh)
+{
+ m_aGFHigh = aGFHigh;
+}
+
+int DeviceDetails::aGFSelectable() const
+{
+ return m_aGFSelectable;
+}
+
+void DeviceDetails::setAGFSelectable(int aGFSelectable)
+{
+ m_aGFSelectable = aGFSelectable;
+}
+
+int DeviceDetails::saturation() const
+{
+ return m_saturation;
+}
+
+void DeviceDetails::setSaturation(int saturation)
+{
+ m_saturation = saturation;
+}
+
+int DeviceDetails::desaturation() const
+{
+ return m_desaturation;
+}
+
+void DeviceDetails::setDesaturation(int desaturation)
+{
+ m_desaturation = desaturation;
+}
+
+int DeviceDetails::units() const
+{
+ return m_units;
+}
+
+void DeviceDetails::setUnits(int units)
+{
+ m_units = units;
+}
+
+int DeviceDetails::samplingRate() const
+{
+ return m_samplingRate;
+}
+
+void DeviceDetails::setSamplingRate(int samplingRate)
+{
+ m_samplingRate = samplingRate;
+}
+
+int DeviceDetails::salinity() const
+{
+ return m_salinity;
+}
+
+void DeviceDetails::setSalinity(int salinity)
+{
+ m_salinity = salinity;
+}
+
+int DeviceDetails::compassGain() const
+{
+ return m_compassGain;
+}
+
+void DeviceDetails::setCompassGain(int compassGain)
+{
+ m_compassGain = compassGain;
+}
+
+int DeviceDetails::pressureSensorOffset() const
+{
+ return m_pressureSensorOffset;
+}
+
+void DeviceDetails::setPressureSensorOffset(int pressureSensorOffset)
+{
+ m_pressureSensorOffset = pressureSensorOffset;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/qt-ui/devicedetails.h b/qt-ui/devicedetails.h
index a0d0f18c2..d754e9774 100644
--- a/qt-ui/devicedetails.h
+++ b/qt-ui/devicedetails.h
@@ -5,6 +5,18 @@
#include <QDateTime>
#include "libdivecomputer.h"
+struct gas {
+ int oxygen;
+ int helium;
+ int type;
+ int depth;
+};
+
+struct setpoint {
+ int sp;
+ int depth;
+};
+
class DeviceDetails : public QObject
{
Q_OBJECT
@@ -41,17 +53,149 @@ public:
bool syncTime() const;
void setSyncTime(bool syncTime);
+ gas gas1() const;
+ void setGas1(const gas &gas1);
+
+ gas gas2() const;
+ void setGas2(const gas &gas2);
+
+ gas gas3() const;
+ void setGas3(const gas &gas3);
+
+ gas gas4() const;
+ void setGas4(const gas &gas4);
+
+ gas gas5() const;
+ void setGas5(const gas &gas5);
+
+ gas dil1() const;
+ void setDil1(const gas &dil1);
+
+ gas dil2() const;
+ void setDil2(const gas &dil2);
+
+ gas dil3() const;
+ void setDil3(const gas &dil3);
+
+ gas dil4() const;
+ void setDil4(const gas &dil4);
+
+ gas dil5() const;
+ void setDil5(const gas &dil5);
+
+ setpoint sp1() const;
+ void setSp1(const setpoint &sp1);
+
+ setpoint sp2() const;
+ void setSp2(const setpoint &sp2);
+
+ setpoint sp3() const;
+ void setSp3(const setpoint &sp3);
+
+ setpoint sp4() const;
+ void setSp4(const setpoint &sp4);
+
+ setpoint sp5() const;
+ void setSp5(const setpoint &sp5);
+
+ int ccrMode() const;
+ void setCcrMode(int ccrMode);
+
+ int diveMode() const;
+ void setDiveMode(int diveMode);
+
+ int decoType() const;
+ void setDecoType(int decoType);
+
+ int pp02Max() const;
+ void setPp02Max(int pp02Max);
+
+ int pp02Min() const;
+ void setPp02Min(int pp02Min);
+
+ int futureTTS() const;
+ void setFutureTTS(int futureTTS);
+
+ int gfLow() const;
+ void setGfLow(int gfLow);
+
+ int gfHigh() const;
+ void setGfHigh(int gfHigh);
+
+ int aGFLow() const;
+ void setAGFLow(int aGFLow);
+
+ int aGFHigh() const;
+ void setAGFHigh(int aGFHigh);
+
+ int aGFSelectable() const;
+ void setAGFSelectable(int aGFSelectable);
+
+ int saturation() const;
+ void setSaturation(int saturation);
+
+ int desaturation() const;
+ void setDesaturation(int desaturation);
+
+ int units() const;
+ void setUnits(int units);
+
+ int samplingRate() const;
+ void setSamplingRate(int samplingRate);
+
+ int salinity() const;
+ void setSalinity(int salinity);
+
+ int compassGain() const;
+ void setCompassGain(int compassGain);
+
+ int pressureSensorOffset() const;
+ void setPressureSensorOffset(int pressureSensorOffset);
+
private:
device_data_t *m_data;
QString m_serialNo;
QString m_firmwareVersion;
QString m_customText;
+ bool m_syncTime;
+ gas m_gas1;
+ gas m_gas2;
+ gas m_gas3;
+ gas m_gas4;
+ gas m_gas5;
+ gas m_dil1;
+ gas m_dil2;
+ gas m_dil3;
+ gas m_dil4;
+ gas m_dil5;
+ setpoint m_sp1;
+ setpoint m_sp2;
+ setpoint m_sp3;
+ setpoint m_sp4;
+ setpoint m_sp5;
+ int m_ccrMode;
+ int m_diveMode;
+ int m_decoType;
+ int m_pp02Max;
+ int m_pp02Min;
+ int m_futureTTS;
+ int m_gfLow;
+ int m_gfHigh;
+ int m_aGFLow;
+ int m_aGFHigh;
+ int m_aGFSelectable;
+ int m_saturation;
+ int m_desaturation;
+ int m_lastDeco;
int m_brightness;
+ int m_units;
+ int m_samplingRate;
+ int m_salinity;
int m_diveModeColor;
int m_language;
int m_dateFormat;
- int m_lastDeco;
- bool m_syncTime;
+ int m_compassGain;
+ int m_pressureSensorOffset;
};