mirror of
https://github.com/nymea/nymea-plugins.git
synced 2026-07-18 00:43:48 +02:00
added discovery by service uuids
This commit is contained in:
parent
b4197e8f23
commit
e3658865a1
@ -58,7 +58,7 @@ void DevicePluginLukeRoberts::discoverDevices(DeviceDiscoveryInfo *info)
|
||||
}
|
||||
|
||||
foreach (const QBluetoothDeviceInfo &deviceInfo, reply->discoveredDevices()) {
|
||||
if (deviceInfo.name().contains("LRF")) {
|
||||
if (deviceInfo.serviceUuids().contains(customControlServiceUuid)) {
|
||||
DeviceDescriptor descriptor(modelFDeviceClassId, "Model F", deviceInfo.name() + " (" + deviceInfo.address().toString() + ")");
|
||||
ParamList params;
|
||||
|
||||
@ -221,6 +221,12 @@ void DevicePluginLukeRoberts::executeBrowserItemAction(BrowserItemActionInfo *in
|
||||
}
|
||||
}
|
||||
|
||||
void DevicePluginLukeRoberts::onPluginConfigurationChanged(const ParamTypeId ¶mTypeId, const QVariant &value)
|
||||
{
|
||||
Q_UNUSED(paramTypeId)
|
||||
Q_UNUSED(value)
|
||||
}
|
||||
|
||||
|
||||
void DevicePluginLukeRoberts::onReconnectTimeout()
|
||||
{
|
||||
|
||||
@ -26,8 +26,6 @@
|
||||
#include <QBitArray>
|
||||
#include <QtEndian>
|
||||
|
||||
static QBluetoothUuid customControlServiceUuid = QBluetoothUuid(QUuid("44092840-0567-11E6-B862-0002A5D5C51B"));
|
||||
static QBluetoothUuid externalApiEndpointCharacteristicUuid = QBluetoothUuid(QUuid("44092842-0567-11E6-B862-0002A5D5C51B"));
|
||||
|
||||
|
||||
LukeRoberts::LukeRoberts(BluetoothLowEnergyDevice *bluetoothDevice, QObject *parent) :
|
||||
|
||||
@ -31,6 +31,8 @@
|
||||
#include "typeutils.h"
|
||||
#include "hardware/bluetoothlowenergy/bluetoothlowenergydevice.h"
|
||||
|
||||
static QBluetoothUuid customControlServiceUuid = QBluetoothUuid(QUuid("44092840-0567-11E6-B862-0002^"));
|
||||
static QBluetoothUuid externalApiEndpointCharacteristicUuid = QBluetoothUuid(QUuid("44092842-0567-11E6-B862-0002A5D5C51B"));
|
||||
|
||||
inline QByteArray &operator<<(QByteArray &l, quint8 r)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user