mirror of
https://gitlab.com/eql/lqml.git
synced 2026-01-07 17:52:47 -08:00
example 'meshtastic': let user select device, remember latest one used, update for android 12
This commit is contained in:
parent
ae461af4ca
commit
96d6843267
29 changed files with 461 additions and 216 deletions
|
|
@ -92,23 +92,23 @@ void BLE_ME::searchCharacteristics() {
|
|||
}
|
||||
|
||||
if (toRadio.isValid() && fromRadio.isValid() && fromNum.isValid()) {
|
||||
ecl_fun("radio:set-ready");
|
||||
ecl_fun("lora:set-ready");
|
||||
}
|
||||
}
|
||||
|
||||
void BLE_ME::characteristicChanged(const QLowEnergyCharacteristic&,
|
||||
const QByteArray& data) {
|
||||
if (!data.isEmpty()) {
|
||||
ecl_fun("radio:received-from-radio", data, "notified");
|
||||
ecl_fun("lora:received-from-radio", data, "notified");
|
||||
}
|
||||
}
|
||||
|
||||
void BLE_ME::characteristicRead(const QLowEnergyCharacteristic&,
|
||||
const QByteArray& data) {
|
||||
if (data.isEmpty()) {
|
||||
ecl_fun("radio:receiving-done");
|
||||
ecl_fun("lora:receiving-done");
|
||||
} else {
|
||||
ecl_fun("radio:received-from-radio", data);
|
||||
ecl_fun("lora:received-from-radio", data);
|
||||
QTimer::singleShot(0, this, &BLE_ME::read);
|
||||
}
|
||||
}
|
||||
|
|
@ -151,7 +151,7 @@ void BLE_ME::disconnecting() {
|
|||
// disable notifications
|
||||
mainService->writeDescriptor(notifications, QByteArray::fromHex("0000"));
|
||||
}
|
||||
ecl_fun("radio:set-ready", false);
|
||||
ecl_fun("lora:set-ready", false);
|
||||
delete mainService; mainService = nullptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue