Fix BLE pairing display and RX gain defaults
This commit is contained in:
1 parent
968ca3363b
commit
2ff1166c15
22 files changed
+297
-39
No files matched your search
@@ -90,6 +90,18 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isBluetoothConnected() const {
|
||||
if (!_enabled) return false;
|
||||
|
||||
for (auto iface : _interfaces) {
|
||||
if (iface.instance && iface.type == InterfaceType::Bluetooth
|
||||
&& iface.instance->isEnabled() && iface.instance->isConnected()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// enable all interfaces
|
||||
void enable() override {
|
||||
_enabled = true;
|
||||
@@ -181,7 +193,8 @@ public:
|
||||
|
||||
bool takePairingRequest() override {
|
||||
for (auto iface : _interfaces) {
|
||||
if (iface.instance && iface.instance->isEnabled()
|
||||
if (iface.instance && iface.type == InterfaceType::Bluetooth
|
||||
&& iface.instance->isEnabled()
|
||||
&& iface.instance->takePairingRequest()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user