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:
Anton Lundin 2014-10-27 20:37:10 +01:00 committed by Dirk Hohndel
parent ae4015dc10
commit aeebe8519d

View file

@ -433,6 +433,10 @@ void ReadSettingsThread::run()
supported = false; supported = false;
break; break;
} }
} else {
lastError = tr("Could not a establish connection to the dive computer.");
emit error(lastError);
}
unsupported_dc_error: unsupported_dc_error:
dc_device_close(m_data->device); dc_device_close(m_data->device);
@ -441,11 +445,6 @@ unsupported_dc_error:
emit error(lastError); emit error(lastError);
} }
} }
else {
lastError = tr("Could not a establish connection to the dive computer.");
emit error(lastError);
}
}
WriteSettingsThread::WriteSettingsThread(QObject *parent, device_data_t *data) WriteSettingsThread::WriteSettingsThread(QObject *parent, device_data_t *data)
: QThread(parent), m_data(data) { : QThread(parent), m_data(data) {
@ -500,8 +499,7 @@ void WriteSettingsThread::run()
dc_device_write(m_data->device, SUUNTO_VYPER_ALARM_DEPTH, data2, 2); dc_device_write(m_data->device, SUUNTO_VYPER_ALARM_DEPTH, data2, 2);
break; break;
#if DC_VERSION_CHECK(0,5,0) #if DC_VERSION_CHECK(0,5,0)
case DC_FAMILY_HW_OSTC3: case DC_FAMILY_HW_OSTC3: {
{
supported = true; supported = true;
//write gas values //write gas values
unsigned char gas1Data[4] = {m_deviceDetails->gas1().oxygen, unsigned char gas1Data[4] = {m_deviceDetails->gas1().oxygen,