summaryrefslogtreecommitdiffstats
path: root/core/btdiscovery.cpp
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2017-07-03 11:16:18 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-04 05:49:52 +0900
commitd7b8ad7a443575d10eef0ad49b51313550b77b79 (patch)
treecb78b501edbe201088844ac6598b3de15428fae5 /core/btdiscovery.cpp
parent096682cd942f4dcc42a6f40edff85c28720e75bc (diff)
downloadsubsurface-d7b8ad7a443575d10eef0ad49b51313550b77b79.tar.gz
BT discovery Android: Allow BT/LE devices connect both ways
For DCs that support both BT and LE, allow the user to connect to both interface layers. Maybe not usefull in the end (as BT is faster than LE), but as long as BT on Android is WIP is it very useful to be able to connect to the interface layer we like. Just add it to the Paired Devices list twice. The normal way, and the LE: prepend way. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'core/btdiscovery.cpp')
-rw-r--r--core/btdiscovery.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp
index bfc3dc8d2..a5317e58a 100644
--- a/core/btdiscovery.cpp
+++ b/core/btdiscovery.cpp
@@ -229,6 +229,11 @@ void BTDiscovery::getBluetoothDevices()
result.name = dev.callObjectMethod("getName", "()Ljava/lang/String;").toString();
qDebug() << "paired Device type" << btType << "with address" << result.address;
btPairedDevices.append(result);
+ if (btType == 3) { // DEVICE_TYPE_DUAL
+ result.address = QString("LE:%1").arg(result.address);
+ qDebug() << "paired Device type" << btType << "with address" << result.address;
+ btPairedDevices.append(result);
+ }
}
}
}