mirror of
https://gitlab.com/eql/lqml.git
synced 2026-01-03 15:53:01 -08:00
example 'meshtastic': review USB mode, add setting in menu
This commit is contained in:
parent
a8a6b0058b
commit
80354e321a
12 changed files with 119 additions and 72 deletions
|
|
@ -35,6 +35,10 @@ void BLE::startDeviceDiscovery(const QString& name) {
|
|||
discoveryAgent->start(QBluetoothDeviceDiscoveryAgent::LowEnergyMethod);
|
||||
}
|
||||
|
||||
void BLE::stopDeviceDiscovery() {
|
||||
discoveryAgent->stop();
|
||||
}
|
||||
|
||||
void BLE::addDevice(const QBluetoothDeviceInfo& device) {
|
||||
if (deviceFilter(device)) {
|
||||
QString name(device.name());
|
||||
|
|
@ -176,7 +180,7 @@ void BLE::errorReceived(QLowEnergyController::Error) {
|
|||
Q_EMIT bleError();
|
||||
}
|
||||
|
||||
void BLE::disconnectFromDevice() {
|
||||
void BLE::disconnect() {
|
||||
if (controller->state() != QLowEnergyController::UnconnectedState) {
|
||||
controller->disconnectFromDevice();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue