[esp32_ble_client] Move set_idle_() to header for inlining

This commit is contained in:
J. Nick Koston
2026-02-23 09:35:47 -06:00
parent 22d9f50034
commit a0b69effe4
2 changed files with 4 additions and 6 deletions

View File

@@ -236,11 +236,6 @@ void BLEClientBase::log_warning_(const char *message) {
ESP_LOGW(TAG, "[%d] [%s] %s", this->connection_index_, this->address_str_, message);
}
void BLEClientBase::set_idle_() {
this->set_state(espbt::ClientState::IDLE);
this->conn_id_ = UNSET_CONN_ID;
}
void BLEClientBase::update_conn_params_(uint16_t min_interval, uint16_t max_interval, uint16_t latency,
uint16_t timeout, const char *param_type) {
esp_ble_conn_update_params_t conn_params = {{0}};

View File

@@ -138,7 +138,10 @@ class BLEClientBase : public espbt::ESPBTClient, public Component {
void log_connection_params_(const char *param_type);
void handle_connection_result_(esp_err_t ret);
/// Transition to IDLE and reset conn_id — call when the connection is fully dead.
void set_idle_();
void set_idle_() {
this->set_state(espbt::ClientState::IDLE);
this->conn_id_ = UNSET_CONN_ID;
}
// Compact error logging helpers to reduce flash usage
void log_error_(const char *message);
void log_error_(const char *message, int code);