mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 02:30:38 -08:00
40 lines
1 KiB
C++
40 lines
1 KiB
C++
#pragma once
|
|
|
|
#include "ble.h"
|
|
|
|
#define UID QBluetoothUuid
|
|
#define STR QStringLiteral
|
|
|
|
class BLE_ME : public BLE {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
BLE_ME();
|
|
|
|
static const UID uuid_service;
|
|
static const UID uuid_fromRadio;
|
|
static const UID uuid_fromNum;
|
|
static const UID uuid_toRadio;
|
|
|
|
QLowEnergyCharacteristic fromRadio;
|
|
QLowEnergyCharacteristic fromNum;
|
|
QLowEnergyCharacteristic toRadio;
|
|
|
|
QString nameFilter = "meshtastic";
|
|
QLowEnergyDescriptor notifications;
|
|
|
|
bool deviceFilter(const QBluetoothDeviceInfo&) override;
|
|
|
|
void write(const QByteArray&);
|
|
void searchCharacteristics();
|
|
|
|
public Q_SLOTS:
|
|
void ini();
|
|
void read();
|
|
void serviceStateChanged(QLowEnergyService::ServiceState);
|
|
void characteristicChanged(const QLowEnergyCharacteristic&, const QByteArray&);
|
|
void characteristicRead(const QLowEnergyCharacteristic&, const QByteArray&);
|
|
void characteristicWritten(const QLowEnergyCharacteristic&, const QByteArray&);
|
|
void serviceError(QLowEnergyService::ServiceError);
|
|
void disconnecting();
|
|
};
|