Only show bobbycars in list

This commit is contained in:
CommanderRedYT
2021-08-15 19:54:04 +02:00
parent 7286c6124b
commit eb0a67aea7

View File

@ -47,7 +47,11 @@ void DeviceFinder::addDevice(const QBluetoothDeviceInfo &device)
{
// If device is LowEnergy-device, add it to the list
if (device.coreConfigurations() & QBluetoothDeviceInfo::LowEnergyCoreConfiguration) {
m_devices.append(new DeviceInfo(device));
//m_devices.append(new DeviceInfo(device));
auto info = new DeviceInfo(device);
if(info->getName().contains("bobby")) { // Only add devices with "bobby" in device name to list; (filter)
m_devices.append(info);
}
setInfo(tr("Low Energy device found. Scanning more..."));
//! [devicediscovery-3]
emit devicesChanged();