mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Cleanup syntax and styling in Configure DC
This cleans up some styling and syntax in the Configure Dive Computer code path. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ae4015dc10
commit
aeebe8519d
1 changed files with 10 additions and 12 deletions
|
@ -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,18 +433,17 @@ void ReadSettingsThread::run()
|
|||
supported = false;
|
||||
break;
|
||||
}
|
||||
unsupported_dc_error:
|
||||
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 {
|
||||
} else {
|
||||
lastError = tr("Could not a establish connection to the dive computer.");
|
||||
emit error(lastError);
|
||||
}
|
||||
unsupported_dc_error:
|
||||
dc_device_close(m_data->device);
|
||||
|
||||
if (!supported) {
|
||||
lastError = tr("This feature is not yet available for the selected dive computer.");
|
||||
emit error(lastError);
|
||||
}
|
||||
}
|
||||
|
||||
WriteSettingsThread::WriteSettingsThread(QObject *parent, device_data_t *data)
|
||||
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue