mirror of
https://github.com/esphome/esphome.git
synced 2025-09-08 22:32:21 +01:00
Add logging for BLE connection slots (#4098)
This commit is contained in:
@@ -41,15 +41,7 @@ class BluetoothProxy : public esp32_ble_tracker::ESPBTDeviceListener, public Com
|
||||
void bluetooth_gatt_send_services(const api::BluetoothGATTGetServicesRequest &msg);
|
||||
void bluetooth_gatt_notify(const api::BluetoothGATTNotifyRequest &msg);
|
||||
|
||||
int get_bluetooth_connections_free() {
|
||||
int free = 0;
|
||||
for (auto *connection : this->connections_) {
|
||||
if (connection->address_ == 0) {
|
||||
free++;
|
||||
}
|
||||
}
|
||||
return free;
|
||||
}
|
||||
int get_bluetooth_connections_free();
|
||||
int get_bluetooth_connections_limit() { return this->connections_.size(); }
|
||||
|
||||
void set_active(bool active) { this->active_ = active; }
|
||||
|
Reference in New Issue
Block a user