mirror of
https://gitlab.com/eql/lqml.git
synced 2026-01-03 07:42:27 -08:00
example 'meshtastic', add iOS version, background ini, startup animation
This commit is contained in:
parent
1f72af5440
commit
0446628830
25 changed files with 181 additions and 111 deletions
|
|
@ -17,8 +17,6 @@ BLE::BLE(const QBluetoothUuid& uuid) : mainServiceUuid(uuid) {
|
|||
connect(discoveryAgent, QOverload<QBluetoothDeviceDiscoveryAgent::Error>::of(&QBluetoothDeviceDiscoveryAgent::error),
|
||||
this, &BLE::deviceScanError);
|
||||
connect(discoveryAgent, &QBluetoothDeviceDiscoveryAgent::finished, this, &BLE::deviceScanFinished);
|
||||
|
||||
QTimer::singleShot(0, this, &BLE::startDeviceDiscovery);
|
||||
}
|
||||
|
||||
void BLE::startDeviceDiscovery() {
|
||||
|
|
@ -60,8 +58,7 @@ void BLE::scanServices() {
|
|||
if (controller && (previousAddress != currentDevice.address())) {
|
||||
Q_EMIT deviceDisconnecting();
|
||||
controller->disconnectFromDevice();
|
||||
delete controller;
|
||||
controller = nullptr;
|
||||
delete controller; controller = nullptr;
|
||||
}
|
||||
|
||||
if (!controller) {
|
||||
|
|
|
|||
|
|
@ -35,10 +35,11 @@ Q_SIGNALS:
|
|||
void mainServiceReady();
|
||||
void deviceDisconnecting();
|
||||
|
||||
/*** </INTERFACE> *********************************************************/
|
||||
|
||||
public Q_SLOTS:
|
||||
void startDeviceDiscovery();
|
||||
|
||||
/*** </INTERFACE> *********************************************************/
|
||||
|
||||
void scanServices();
|
||||
void connectToService(const QString&);
|
||||
void disconnectFromDevice();
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ QT::QT() : QObject() {
|
|||
ble = new BLE_ME;
|
||||
}
|
||||
|
||||
QVariant QT::startDeviceDiscovery() {
|
||||
ble->startDeviceDiscovery();
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant QT::read2() {
|
||||
ble->read();
|
||||
return QVariant();
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ class QT : public QObject {
|
|||
|
||||
public:
|
||||
// BLE_ME
|
||||
Q_INVOKABLE QVariant startDeviceDiscovery();
|
||||
Q_INVOKABLE QVariant read2();
|
||||
Q_INVOKABLE QVariant write2(const QVariant&);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue