[PATCH] Remove libdivecomputer ifdefs for configuring OSTC

Anton Lundin glance at acc.umu.se
Tue Dec 2 00:28:52 PST 2014


The hw_ostc_device_eeprom_read / hw_ostc_device_eeprom_write functions
have bin in libdivecomputer since v0.1.0, so there was an error when the
read settings part ended up behind ifdef's.

Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 configuredivecomputerthreads.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp
index e26935d..cfe8735 100644
--- a/configuredivecomputerthreads.cpp
+++ b/configuredivecomputerthreads.cpp
@@ -112,11 +112,9 @@ 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.
@@ -490,6 +488,7 @@ void ReadSettingsThread::run()
 			emit devicedetails(m_deviceDetails);
 			break;
 		}
+#endif	// divecomputer 0.5.0
 #ifdef DEBUG_OSTC
 		case DC_FAMILY_NULL:
 #endif
@@ -796,7 +795,6 @@ void ReadSettingsThread::run()
 			emit devicedetails(m_deviceDetails);
 			break;
 		}
-#endif	// divecomputer 0.5.0
 		default:
 			supported = false;
 			break;
-- 
1.9.1



More information about the subsurface mailing list