代码拉取完成,页面将自动刷新
同步操作将从 nabian/TelinkOTA 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#ifndef QGPIO_BLE_H
#define QGPIO_BLE_H
#include <qbluetoothlocaldevice.h>
#include <QBluetoothDeviceDiscoveryAgent>
#include <QLowEnergyController>
#include <QBluetoothDeviceInfo>
QT_FORWARD_DECLARE_CLASS(QBluetoothDeviceDiscoveryAgent)
QT_FORWARD_DECLARE_CLASS(QBluetoothDeviceInfo)
class QGPIOBle : public QObject
{
Q_OBJECT
public slots:
void deviceConnected_cb();
void addLowEnergyService(const QBluetoothUuid &uuid);
void serviceScanDone_cb();
void serviceStateChanged_cb(QLowEnergyService::ServiceState s);
void CharaterNotify_cb(const QLowEnergyCharacteristic &c, const QByteArray &value);
void confirmedcharacteristicWrite(const QLowEnergyCharacteristic &d, const QByteArray &value);
void serviceStateErr_cb(QLowEnergyService::ServiceError newError);
void deviceDisconnected_cb();
void ControllerError_cb(QLowEnergyController::Error);
void FindDevice_cb(const QBluetoothDeviceInfo &info);
void deviceScanError_cb(QBluetoothDeviceDiscoveryAgent::Error error);
void scanFinished_cb();
protected:
public:
explicit QGPIOBle(QObject *parent = nullptr);
~QGPIOBle();
void connect_service(const QString Uuid);
void connectDevice();
void startScan();
bool writeCharacteristics(QLowEnergyService *ser,QLowEnergyCharacteristic &c, QByteArray &sendbuffer, bool rsp);
QBluetoothDeviceDiscoveryAgent *discoveryAgent;
QBluetoothLocalDevice *localDevice;
QLowEnergyController *controller = nullptr;
QBluetoothDeviceInfo currentDevice;
bool connected = false;
void disconnect_service(QLowEnergyService *service);
QLowEnergyService *m_service = nullptr;
QLowEnergyDescriptor m_notificationDesc;
QList<QObject *> m_services;
QList<QObject *> m_characteristics;
QList<QBluetoothDeviceInfo *> Devicelist;
QLowEnergyCharacteristic OtaChar;
signals:
void emit_scanfinish();
void emit_confirmedcharacteristicWrite(const QString uuid, const QByteArray &value);
void emit_CharaterNotify(const QString uuid, const QByteArray &value);
};
#endif // QGPIO_BLE_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。