summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-10-20 22:58:25 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-20 18:12:37 -0700
commit856ec092b73acc8bc7942beb2e040647c848a354 (patch)
tree9e55b75787f2a6994f0ab1f40c2479d4c4370f75
parent02dcae3eca69447f2f51e258fccb6081d261c544 (diff)
downloadsubsurface-856ec092b73acc8bc7942beb2e040647c848a354.tar.gz
Configure support for OSTC, Mk.2/2N/2C
First out is firmware updates. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--configuredivecomputerthreads.cpp16
-rw-r--r--qt-ui/configuredivecomputerdialog.cpp5
-rw-r--r--qt-ui/configuredivecomputerdialog.ui21
3 files changed, 39 insertions, 3 deletions
diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp
index a96548e0f..7856a150f 100644
--- a/configuredivecomputerthreads.cpp
+++ b/configuredivecomputerthreads.cpp
@@ -690,12 +690,22 @@ void FirmwareUpdateThread::run()
dc_status_t rc;
rc = dc_device_open(&m_data->device, m_data->context, m_data->descriptor, m_data->devname);
if (rc == DC_STATUS_SUCCESS) {
+ switch (dc_device_get_type(m_data->device)) {
#if DC_VERSION_CHECK(0, 5, 0)
- if (dc_device_get_type(m_data->device) == DC_FAMILY_HW_OSTC3) {
- supported = true;
+ case DC_FAMILY_HW_OSTC3:
+ //Not Yet supported
+ //supported = true;
//hw_ostc3_device_fwupdate(m_data->device, m_fileName.toUtf8().data());
- }
+ break;
#endif // divecomputer 0.5.0
+ case DC_FAMILY_HW_OSTC:
+ supported = true;
+ hw_ostc_device_fwupdate(m_data->device, m_fileName.toUtf8().data());
+ break;
+ default:
+ supported = false;
+ break;
+ }
dc_device_close(m_data->device);
if (!supported) {
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
index 781a0e633..fd1edfe31 100644
--- a/qt-ui/configuredivecomputerdialog.cpp
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -622,6 +622,11 @@ void ConfigureDiveComputerDialog::on_DiveComputerList_currentRowChanged(int curr
selected_product = "Vyper";
ui.updateFirmwareButton->setEnabled(false);
break;
+ case 2:
+ selected_vendor = "Heinrichs Weikamp";
+ selected_product = "OSTC 2N";
+ ui.updateFirmwareButton->setEnabled(true);
+ break;
default:
/* Not Supported */
return;
diff --git a/qt-ui/configuredivecomputerdialog.ui b/qt-ui/configuredivecomputerdialog.ui
index 04b2aafeb..490205277 100644
--- a/qt-ui/configuredivecomputerdialog.ui
+++ b/qt-ui/configuredivecomputerdialog.ui
@@ -184,6 +184,11 @@
<normaloff>:/icons/suunto_vyper.png</normaloff>:/icons/suunto_vyper.png</iconset>
</property>
</item>
+ <item>
+ <property name="text">
+ <string>OSTC, Mk.2/2N/2C</string>
+ </property>
+ </item>
</widget>
<widget class="QStackedWidget" name="dcStackedWidget">
<property name="currentIndex">
@@ -1594,6 +1599,22 @@
</item>
</layout>
</widget>
+ <widget class="QWidget" name="page_ostc">
+ <layout class="QVBoxLayout">
+ <item>
+ <widget class="QTabWidget" name="tabWidget3">
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="basicSettings3">
+ <attribute name="title">
+ <string>Basic settings</string>
+ </attribute>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</widget>
</item>