mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Ensure Subsurface still compiles with libdivecomputer 0.4.x
The OSTC3 functions we need were introduced in 0.5.0 (more specifically, in commit 56e2dec7266e71e725604a4a8bff5e61f3d62259). Signed-off-by: Thiago Macieira <thiago@macieira.org>
This commit is contained in:
parent
4e99382c96
commit
1b866e67f3
1 changed files with 6 additions and 2 deletions
|
@ -58,6 +58,7 @@ void ReadSettingsThread::run()
|
||||||
if (rc == DC_STATUS_SUCCESS) {
|
if (rc == DC_STATUS_SUCCESS) {
|
||||||
DeviceDetails *m_deviceDetails = new DeviceDetails(0);
|
DeviceDetails *m_deviceDetails = new DeviceDetails(0);
|
||||||
switch (dc_device_get_type(m_data->device)) {
|
switch (dc_device_get_type(m_data->device)) {
|
||||||
|
#if DC_VERSION_CHECK(0, 5, 0)
|
||||||
case DC_FAMILY_HW_OSTC3:
|
case DC_FAMILY_HW_OSTC3:
|
||||||
supported = true;
|
supported = true;
|
||||||
m_deviceDetails->setBrightness(0);
|
m_deviceDetails->setBrightness(0);
|
||||||
|
@ -296,7 +297,7 @@ void ReadSettingsThread::run()
|
||||||
|
|
||||||
emit devicedetails(m_deviceDetails);
|
emit devicedetails(m_deviceDetails);
|
||||||
break;
|
break;
|
||||||
|
#endif // divecomputer 0.5.0
|
||||||
}
|
}
|
||||||
dc_device_close(m_data->device);
|
dc_device_close(m_data->device);
|
||||||
|
|
||||||
|
@ -328,6 +329,7 @@ void WriteSettingsThread::run()
|
||||||
rc = rc = dc_device_open(&m_data->device, m_data->context, m_data->descriptor, m_data->devname);
|
rc = rc = dc_device_open(&m_data->device, m_data->context, m_data->descriptor, m_data->devname);
|
||||||
if (rc == DC_STATUS_SUCCESS) {
|
if (rc == DC_STATUS_SUCCESS) {
|
||||||
switch (dc_device_get_type(m_data->device)) {
|
switch (dc_device_get_type(m_data->device)) {
|
||||||
|
#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
|
||||||
|
@ -493,7 +495,7 @@ void WriteSettingsThread::run()
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
#endif // divecomputer 0.5.0
|
||||||
}
|
}
|
||||||
dc_device_close(m_data->device);
|
dc_device_close(m_data->device);
|
||||||
|
|
||||||
|
@ -522,10 +524,12 @@ void FirmwareUpdateThread::run()
|
||||||
rc = rc = dc_device_open(&m_data->device, m_data->context, m_data->descriptor, m_data->devname);
|
rc = rc = dc_device_open(&m_data->device, m_data->context, m_data->descriptor, m_data->devname);
|
||||||
if (rc == DC_STATUS_SUCCESS) {
|
if (rc == DC_STATUS_SUCCESS) {
|
||||||
switch (dc_device_get_type(m_data->device)) {
|
switch (dc_device_get_type(m_data->device)) {
|
||||||
|
#if DC_VERSION_CHECK(0, 5, 0)
|
||||||
case DC_FAMILY_HW_OSTC3:
|
case DC_FAMILY_HW_OSTC3:
|
||||||
supported = true;
|
supported = true;
|
||||||
//hw_ostc3_device_fwupdate(m_data->device, m_fileName.toUtf8().data());
|
//hw_ostc3_device_fwupdate(m_data->device, m_fileName.toUtf8().data());
|
||||||
break;
|
break;
|
||||||
|
#endif // divecomputer 0.5.0
|
||||||
}
|
}
|
||||||
dc_device_close(m_data->device);
|
dc_device_close(m_data->device);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue