Skip to content

Commit

Permalink
Fix a couple of problems related to the Windows BLE stack
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Nov 17, 2023
1 parent f8739e8 commit c221429
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/DeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@ void DeviceManager::addBleDevice(const QBluetoothDeviceInfo &info)
if (info.isCached() || info.rssi() == 0) d->setCached(true);
if (info.name().isEmpty()) d->setBeacon(true);
if (info.name().replace('-', ':') == d->getAddress()) d->setBeacon(true);
if (info.name() == "Bluetooth " + d->getAddress().toLower()) d->setBeacon(true);
if (m_devices_blacklist.contains(d->getAddress())) d->setBlacklisted(true);

// Get a random color
Expand Down
2 changes: 1 addition & 1 deletion src/DeviceManager_advertisement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void DeviceManager::updateBleDevice(const QBluetoothDeviceInfo &info,
dd->setName(info.name());
dd->setRssi(info.rssi());
dd->setLastSeen(QDateTime::currentDateTime());
dd->setCached(info.isCached() || info.rssi() >= 0);
dd->setCached(info.rssi() >= 0);
dd->setCoreConfiguration(info.coreConfigurations());
dd->setDeviceClass(info.majorDeviceClass(), info.minorDeviceClass(), info.serviceClasses());
dd->setAdvertisedServices(info.serviceUuids());
Expand Down
2 changes: 1 addition & 1 deletion src/device_toolblex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ DeviceToolBLEx::DeviceToolBLEx(const QBluetoothDeviceInfo &d, QObject *parent):

addAdvertisementEntry(d.rssi(), !d.manufacturerIds().empty(), !d.serviceIds().empty());

m_isCached = (d.isCached() || d.rssi() == 0);
m_isCached = (d.rssi() == 0);
m_hasServiceCache = checkServiceCache();
m_firstSeen = QDateTime::currentDateTime();
m_bluetoothCoreConfiguration = d.coreConfigurations();
Expand Down

0 comments on commit c221429

Please sign in to comment.