1 Commits
main ... fixes

Author SHA1 Message Date
8f3ddce790 work in progress 2023-01-19 22:36:54 +01:00
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ DeviceFinder::DeviceFinder(DeviceHandler *handler, QObject *parent):
m_deviceDiscoveryAgent->setLowEnergyDiscoveryTimeout(5000);
connect(m_deviceDiscoveryAgent, &QBluetoothDeviceDiscoveryAgent::deviceDiscovered, this, &DeviceFinder::addDevice);
connect(m_deviceDiscoveryAgent, static_cast<void (QBluetoothDeviceDiscoveryAgent::*)(QBluetoothDeviceDiscoveryAgent::Error)>(&QBluetoothDeviceDiscoveryAgent::error),
connect(m_deviceDiscoveryAgent, static_cast<void (QBluetoothDeviceDiscoveryAgent::*)(QBluetoothDeviceDiscoveryAgent::Error)>(&QBluetoothDeviceDiscoveryAgent::errorOccurred),
this, &DeviceFinder::scanError);
connect(m_deviceDiscoveryAgent, &QBluetoothDeviceDiscoveryAgent::finished, this, &DeviceFinder::scanFinished);

View File

@ -51,7 +51,7 @@ void DeviceHandler::setDevice(DeviceInfo *device)
connect(m_control, &QLowEnergyController::discoveryFinished,
this, &DeviceHandler::serviceScanDone);
connect(m_control, static_cast<void (QLowEnergyController::*)(QLowEnergyController::Error)>(&QLowEnergyController::error),
connect(m_control, static_cast<void (QLowEnergyController::*)(QLowEnergyController::Error)>(&QLowEnergyController::errorOccurred),
this, [this](QLowEnergyController::Error error) {
Q_UNUSED(error);
setError("Cannot connect to remote device.");
@ -227,7 +227,7 @@ void DeviceHandler::serviceStateChanged(QLowEnergyService::ServiceState s)
switch (s)
{
case QLowEnergyService::DiscoveringServices:
case QLowEnergyService::RemoteServiceDiscovering:
setInfo(tr("Discovering services..."));
break;
case QLowEnergyService::ServiceDiscovered:
@ -236,7 +236,7 @@ void DeviceHandler::serviceStateChanged(QLowEnergyService::ServiceState s)
if (const QLowEnergyCharacteristic hrChar = m_service->characteristic(livestatsCharacUuid); hrChar.isValid())
{
m_notificationDescLivestats = hrChar.descriptor(QBluetoothUuid::ClientCharacteristicConfiguration);
m_notificationDescLivestats = hrChar.descriptor(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration);
if (m_notificationDescLivestats.isValid())
m_service->writeDescriptor(m_notificationDescLivestats, QByteArray::fromHex("0100"));
}