[PATCH] Enable firmware updates for OSTC3/OSTC Sport

Anton Lundin glance at acc.umu.se
Mon Dec 22 14:03:51 PST 2014


This enables the dormant OSTC3/OSTC Sport firmware update code, now when
the hw_ostc3_device_fwupdate call is available in libdivecomputer.

Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 configuredivecomputerthreads.cpp      | 5 ++---
 qt-ui/configuredivecomputerdialog.cpp | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp
index 87b4417..2e16be6 100644
--- a/configuredivecomputerthreads.cpp
+++ b/configuredivecomputerthreads.cpp
@@ -1380,9 +1380,8 @@ void FirmwareUpdateThread::run()
 		switch (dc_device_get_type(m_data->device)) {
 #if DC_VERSION_CHECK(0, 5, 0)
 		case DC_FAMILY_HW_OSTC3:
-			//Not Yet supported
-			//supported = true;
-			//rc = hw_ostc3_device_fwupdate(m_data->device, m_fileName.toUtf8().data());
+			supported = true;
+			rc = hw_ostc3_device_fwupdate(m_data->device, m_fileName.toUtf8().data());
 			break;
 		case DC_FAMILY_HW_OSTC:
 			supported = true;
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
index 7349520..ce25d0e 100644
--- a/qt-ui/configuredivecomputerdialog.cpp
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -981,7 +981,7 @@ void ConfigureDiveComputerDialog::on_DiveComputerList_currentRowChanged(int curr
 	case 0:
 		selected_vendor = "Heinrichs Weikamp";
 		selected_product = "OSTC 3";
-		ui.updateFirmwareButton->setEnabled(false);
+		ui.updateFirmwareButton->setEnabled(true);
 		break;
 	case 1:
 		selected_vendor = "Suunto";
-- 
2.1.0



More information about the subsurface mailing list