mirror of
https://gitlab.com/eql/lqml.git
synced 2026-01-04 08:11:52 -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
|
|
@ -146,10 +146,22 @@ QT::QT() : QObject() {
|
|||
// BLE
|
||||
|
||||
QVariant QT::startDeviceDiscovery(const QVariant& vName) {
|
||||
ble->startDeviceDiscovery(vName.toString());
|
||||
QByteArray connection(ecl_fun("radios:connection").toString().toLatin1());
|
||||
if (connection == "BLE") {
|
||||
usb->disconnect();
|
||||
ble->startDeviceDiscovery(vName.toString());
|
||||
} else if (connection == "USB") {
|
||||
ble->disconnect();
|
||||
usb->connectToRadio();
|
||||
}
|
||||
return vName;
|
||||
}
|
||||
|
||||
QVariant QT::stopDeviceDiscovery() {
|
||||
ble->stopDeviceDiscovery();
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant QT::setDeviceFilter(const QVariant& vName) {
|
||||
ble->setDeviceFilter(vName.toString());
|
||||
return vName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue