From 074f5029eb0432487ed8de7a2f91d76e6c25f3b4 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 21 Dec 2022 14:03:00 +1300 Subject: [PATCH 1/3] Fix gpio pin mode for ISR pins (#4216) --- esphome/components/esp32/gpio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/esp32/gpio.cpp b/esphome/components/esp32/gpio.cpp index 758a707531..aafdf80726 100644 --- a/esphome/components/esp32/gpio.cpp +++ b/esphome/components/esp32/gpio.cpp @@ -128,7 +128,7 @@ void IRAM_ATTR ISRInternalGPIOPin::pin_mode(gpio::Flags flags) { auto *arg = reinterpret_cast(arg_); gpio_set_direction(arg->pin, flags_to_mode(flags)); gpio_pull_mode_t pull_mode = GPIO_FLOATING; - if (flags & (gpio::FLAG_PULLUP | gpio::FLAG_PULLDOWN)) { + if ((flags & gpio::FLAG_PULLUP) && (flags & gpio::FLAG_PULLDOWN)) { pull_mode = GPIO_PULLUP_PULLDOWN; } else if (flags & gpio::FLAG_PULLUP) { pull_mode = GPIO_PULLUP_ONLY; From 00f2655f1aa1a1c89251734e0d03292034434aa8 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 19 Jan 2023 19:31:00 -1000 Subject: [PATCH 2/3] Always send the MTU request for BLE v3 cached connections (#4322) closes https://github.com/esphome/esphome/pull/4321 fixes https://github.com/esphome/issues/issues/4041 fixes https://github.com/esphome/issues/issues/3951 --- .../components/esp32_ble_client/ble_client_base.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/esphome/components/esp32_ble_client/ble_client_base.cpp b/esphome/components/esp32_ble_client/ble_client_base.cpp index 017d65573d..2337a5fe93 100644 --- a/esphome/components/esp32_ble_client/ble_client_base.cpp +++ b/esphome/components/esp32_ble_client/ble_client_base.cpp @@ -132,16 +132,16 @@ bool BLEClientBase::gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_ this->set_state(espbt::ClientState::IDLE); break; } - if (this->connection_type_ == espbt::ConnectionType::V3_WITH_CACHE) { - this->set_state(espbt::ClientState::CONNECTED); - this->state_ = espbt::ClientState::ESTABLISHED; - break; - } auto ret = esp_ble_gattc_send_mtu_req(this->gattc_if_, param->open.conn_id); if (ret) { ESP_LOGW(TAG, "[%d] [%s] esp_ble_gattc_send_mtu_req failed, status=%x", this->connection_index_, this->address_str_.c_str(), ret); } + if (this->connection_type_ == espbt::ConnectionType::V3_WITH_CACHE) { + this->set_state(espbt::ClientState::CONNECTED); + this->state_ = espbt::ClientState::ESTABLISHED; + break; + } esp_ble_gattc_search_service(esp_gattc_if, param->cfg_mtu.conn_id, nullptr); break; } From 958cadeca83360956ab62d30a9582833f748744d Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Fri, 20 Jan 2023 18:33:09 +1300 Subject: [PATCH 3/3] Bump version to 2022.12.4 --- esphome/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/const.py b/esphome/const.py index 91c5165c99..ab11b2faf3 100644 --- a/esphome/const.py +++ b/esphome/const.py @@ -1,6 +1,6 @@ """Constants used by esphome.""" -__version__ = "2022.12.3" +__version__ = "2022.12.4" ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"