From f576e8f6351caf0dc5f56a359190fc8869def072 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 14 Jun 2025 21:40:16 -0500 Subject: [PATCH] remove cap --- esphome/components/esp32_touch/esp32_touch_v1.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/esphome/components/esp32_touch/esp32_touch_v1.cpp b/esphome/components/esp32_touch/esp32_touch_v1.cpp index 5a7b2cec4b..e805bf5f4c 100644 --- a/esphome/components/esp32_touch/esp32_touch_v1.cpp +++ b/esphome/components/esp32_touch/esp32_touch_v1.cpp @@ -68,8 +68,11 @@ void ESP32TouchComponent::setup() { if (this->release_timeout_ms_ < MINIMUM_RELEASE_TIME_MS) { this->release_timeout_ms_ = MINIMUM_RELEASE_TIME_MS; } - // Check for releases at 1/4 the timeout interval, capped at 50ms - this->release_check_interval_ms_ = std::min(this->release_timeout_ms_ / 4, (uint32_t) 50); + // Check for releases at 1/4 the timeout interval + // Since the ESP32 v1 hardware doesn't generate release interrupts, we must poll + // for releases in the main loop. Checking at 1/4 the timeout interval provides + // a good balance between responsiveness and efficiency. + this->release_check_interval_ms_ = this->release_timeout_ms_ / 4; // Enable touch pad interrupt touch_pad_intr_enable();