diff options
author | Thiago Macieira <thiago@macieira.org> | 2014-08-17 10:06:06 -0700 |
---|---|---|
committer | Thiago Macieira <thiago@macieira.org> | 2014-08-17 10:06:06 -0700 |
commit | 1b866e67f3f03347d187d941d51cd35d4c2217ff (patch) | |
tree | ac72aabd86390077b24ab211d7c6e6da243680f1 /configuredivecomputerthreads.cpp | |
parent | 4e99382c96c71e5427a7f1ef011b04f0e560a1f6 (diff) | |
download | subsurface-1b866e67f3f03347d187d941d51cd35d4c2217ff.tar.gz |
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>
Diffstat (limited to 'configuredivecomputerthreads.cpp')
-rw-r--r-- | configuredivecomputerthreads.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp index 7bd921e6d..093499ad1 100644 --- a/configuredivecomputerthreads.cpp +++ b/configuredivecomputerthreads.cpp @@ -58,6 +58,7 @@ void ReadSettingsThread::run() if (rc == DC_STATUS_SUCCESS) { DeviceDetails *m_deviceDetails = new DeviceDetails(0); switch (dc_device_get_type(m_data->device)) { +#if DC_VERSION_CHECK(0, 5, 0) case DC_FAMILY_HW_OSTC3: supported = true; m_deviceDetails->setBrightness(0); @@ -296,7 +297,7 @@ void ReadSettingsThread::run() emit devicedetails(m_deviceDetails); break; - +#endif // divecomputer 0.5.0 } 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); if (rc == DC_STATUS_SUCCESS) { switch (dc_device_get_type(m_data->device)) { +#if DC_VERSION_CHECK(0,5,0) case DC_FAMILY_HW_OSTC3: supported = true; //write gas values @@ -493,7 +495,7 @@ void WriteSettingsThread::run() } break; - +#endif // divecomputer 0.5.0 } 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); if (rc == DC_STATUS_SUCCESS) { switch (dc_device_get_type(m_data->device)) { +#if DC_VERSION_CHECK(0, 5, 0) case DC_FAMILY_HW_OSTC3: supported = true; //hw_ostc3_device_fwupdate(m_data->device, m_fileName.toUtf8().data()); break; +#endif // divecomputer 0.5.0 } dc_device_close(m_data->device); |