[PATCH 3/3] configuredivecomputerthreads.cpp: conditionally define read_ostc_cf()
Lubomir I. Ivanov
neolit123 at gmail.com
Thu Nov 27 11:55:25 PST 2014
From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
Fixes a warning. The function is only used if
DC_VERSION_CHECK(0, 5, 0) is defined.
Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
configuredivecomputerthreads.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp
index 6d6e089..e26935d 100644
--- a/configuredivecomputerthreads.cpp
+++ b/configuredivecomputerthreads.cpp
@@ -112,9 +112,11 @@ ReadSettingsThread::ReadSettingsThread(QObject *parent, device_data_t *data)
}
+#if DC_VERSION_CHECK(0, 5, 0)
static int read_ostc_cf(unsigned char data[], unsigned char cf) {
return data[128 + (cf % 32) * 4 + 3] << 8 ^ data[128 + (cf % 32) * 4 + 2];
}
+#endif
static void write_ostc_cf(unsigned char data[], unsigned char cf, unsigned char max_CF, unsigned int value) {
// Only write settings supported by this firmware.
--
1.7.11.msysgit.0
More information about the subsurface
mailing list