mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-07 11:01:01 -08:00
revision
This commit is contained in:
parent
c77d993496
commit
f9e657fa83
5 changed files with 28 additions and 22 deletions
|
|
@ -51,7 +51,16 @@ void BLE::scanServices() {
|
|||
return;
|
||||
}
|
||||
if (!currentDevice.isValid()) {
|
||||
currentDevice = devices.at(0);
|
||||
if (initialDeviceName.isNull()) {
|
||||
currentDevice = devices.at(0);
|
||||
} else {
|
||||
for (auto device : qAsConst(devices)) {
|
||||
if (device.name().contains(initialDeviceName, Qt::CaseInsensitive)) {
|
||||
currentDevice = device;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
services.clear();
|
||||
qDebug() << "connecting to device...";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue