summaryrefslogtreecommitdiffstats
path: root/configuredivecomputerthreads.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'configuredivecomputerthreads.cpp')
-rw-r--r--configuredivecomputerthreads.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp
index 6d12d4d88..668e63831 100644
--- a/configuredivecomputerthreads.cpp
+++ b/configuredivecomputerthreads.cpp
@@ -197,7 +197,7 @@ void ReadSettingsThread::run()
m_deviceDetails->setAlarmDepth(depth);
}
emit devicedetails(m_deviceDetails);
- break;
+ break;
}
#if DC_VERSION_CHECK(0, 5, 0)
case DC_FAMILY_HW_OSTC3: {
@@ -433,16 +433,15 @@ void ReadSettingsThread::run()
supported = false;
break;
}
+ } else {
+ lastError = tr("Could not a establish connection to the dive computer.");
+ emit error(lastError);
+ }
unsupported_dc_error:
- dc_device_close(m_data->device);
+ dc_device_close(m_data->device);
- if (!supported) {
- lastError = tr("This feature is not yet available for the selected dive computer.");
- emit error(lastError);
- }
- }
- else {
- lastError = tr("Could not a establish connection to the dive computer.");
+ if (!supported) {
+ lastError = tr("This feature is not yet available for the selected dive computer.");
emit error(lastError);
}
}
@@ -500,8 +499,7 @@ void WriteSettingsThread::run()
dc_device_write(m_data->device, SUUNTO_VYPER_ALARM_DEPTH, data2, 2);
break;
#if DC_VERSION_CHECK(0,5,0)
- case DC_FAMILY_HW_OSTC3:
- {
+ case DC_FAMILY_HW_OSTC3: {
supported = true;
//write gas values
unsigned char gas1Data[4] = {m_deviceDetails->gas1().oxygen,