From 780cb4fce75b0014485e62d628f9b94bcaae4f8f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 19 Sep 2020 14:58:26 -0700 Subject: core/bluetooth: only Linux / Windows are supported by libdc rfcomm For Android the Qt Bluetooth code seems to work just fine. And for macOS nothing appears to work right now, but at least the Qt implementation compiles and links. Signed-off-by: Dirk Hohndel --- core/libdivecomputer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core') diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index 47b261b7b..a35c0f908 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -1383,7 +1383,12 @@ dc_status_t divecomputer_device_open(device_data_t *data) #ifdef BT_SUPPORT if (transports & DC_TRANSPORT_BLUETOOTH) { dev_info(data, "Opening rfcomm stream %s", data->devname); +#if defined(__ANDROID__) || defined(__APPLE__) + // we don't have BT on iOS in the first place, so this is for Android and macOS + rc = rfcomm_stream_open(&data->iostream, context, data->devname); +#else rc = bluetooth_device_open(&data->iostream, context, data); +#endif if (rc == DC_STATUS_SUCCESS) return rc; } -- cgit v1.2.3-70-g09d2