mirror of
https://github.com/esphome/esphome.git
synced 2025-09-08 22:32:21 +01:00
Merge branch 'bluetooth_connection_churn' into memory_api
This commit is contained in:
@@ -1105,7 +1105,7 @@ void APIConnection::bluetooth_gatt_notify(const BluetoothGATTNotifyRequest &msg)
|
|||||||
|
|
||||||
bool APIConnection::send_subscribe_bluetooth_connections_free_response(
|
bool APIConnection::send_subscribe_bluetooth_connections_free_response(
|
||||||
const SubscribeBluetoothConnectionsFreeRequest &msg) {
|
const SubscribeBluetoothConnectionsFreeRequest &msg) {
|
||||||
bluetooth_proxy::global_bluetooth_proxy->send_connections_free();
|
bluetooth_proxy::global_bluetooth_proxy->send_connections_free(this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -428,11 +428,13 @@ void BluetoothProxy::send_device_connection(uint64_t address, bool connected, ui
|
|||||||
this->api_connection_->send_message(call, api::BluetoothDeviceConnectionResponse::MESSAGE_TYPE);
|
this->api_connection_->send_message(call, api::BluetoothDeviceConnectionResponse::MESSAGE_TYPE);
|
||||||
}
|
}
|
||||||
void BluetoothProxy::send_connections_free() {
|
void BluetoothProxy::send_connections_free() {
|
||||||
if (this->api_connection_ == nullptr)
|
if (this->api_connection_ != nullptr) {
|
||||||
return;
|
this->send_connections_free(this->api_connection_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this->api_connection_->send_message(this->connections_free_response_,
|
void BluetoothProxy::send_connections_free(api::APIConnection *api_connection) {
|
||||||
api::BluetoothConnectionsFreeResponse::MESSAGE_TYPE);
|
api_connection->send_message(this->connections_free_response_, api::BluetoothConnectionsFreeResponse::MESSAGE_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BluetoothProxy::send_gatt_services_done(uint64_t address) {
|
void BluetoothProxy::send_gatt_services_done(uint64_t address) {
|
||||||
|
@@ -81,6 +81,7 @@ class BluetoothProxy : public esp32_ble_tracker::ESPBTDeviceListener, public Com
|
|||||||
|
|
||||||
void send_device_connection(uint64_t address, bool connected, uint16_t mtu = 0, esp_err_t error = ESP_OK);
|
void send_device_connection(uint64_t address, bool connected, uint16_t mtu = 0, esp_err_t error = ESP_OK);
|
||||||
void send_connections_free();
|
void send_connections_free();
|
||||||
|
void send_connections_free(api::APIConnection *api_connection);
|
||||||
void send_gatt_services_done(uint64_t address);
|
void send_gatt_services_done(uint64_t address);
|
||||||
void send_gatt_error(uint64_t address, uint16_t handle, esp_err_t error);
|
void send_gatt_error(uint64_t address, uint16_t handle, esp_err_t error);
|
||||||
void send_device_pairing(uint64_t address, bool paired, esp_err_t error = ESP_OK);
|
void send_device_pairing(uint64_t address, bool paired, esp_err_t error = ESP_OK);
|
||||||
|
Reference in New Issue
Block a user