example 'meshtastic': minor update (define device to be used)

This commit is contained in:
pls.153 2023-06-15 10:31:55 +02:00
parent 9ee7030350
commit c77d993496
11 changed files with 90 additions and 35 deletions

View file

@ -27,7 +27,7 @@ void BLE::startDeviceDiscovery() {
void BLE::addDevice(const QBluetoothDeviceInfo& device) {
if (deviceFilter(device)) {
qDebug() << "device added: " << device.name();
qDebug() << "device added:" << device.name() << device.address().toString();
}
}
@ -108,7 +108,7 @@ void BLE::serviceScanDone() {
void BLE::connectToService(const QString& uuid) {
QLowEnergyService* service = nullptr;
for (auto s: qAsConst(services)) {
for (auto s : qAsConst(services)) {
if (s->serviceUuid().toString() == uuid) {
service = s;
break;