From eae0d90a1efe6476e3db2b0ecfbe4b9a96b8c347 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 12 Jun 2025 15:41:41 -0500 Subject: [PATCH] adjust --- esphome/components/esp32_touch/esp32_touch_v2.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/esphome/components/esp32_touch/esp32_touch_v2.cpp b/esphome/components/esp32_touch/esp32_touch_v2.cpp index 05d224fdf5..fdf02932ae 100644 --- a/esphome/components/esp32_touch/esp32_touch_v2.cpp +++ b/esphome/components/esp32_touch/esp32_touch_v2.cpp @@ -8,10 +8,6 @@ #include #include -// Include HAL for ISR-safe touch reading -#include "hal/touch_sensor_ll.h" -// Include for RTC clock frequency -#include "soc/rtc.h" // Include for ISR-safe printing #include "rom/ets_sys.h" @@ -102,8 +98,8 @@ void ESP32TouchComponent::setup() { // Configure measurement parameters touch_pad_set_voltage(this->high_voltage_reference_, this->low_voltage_reference_, this->voltage_attenuation_); - touch_pad_set_charge_discharge_times(this->meas_cycle_); - touch_pad_set_measurement_interval(this->sleep_cycle_); + // ESP32-S2/S3 always use the older API + touch_pad_set_meas_time(this->sleep_cycle_, this->meas_cycle_); // Configure timeout if needed touch_pad_timeout_set(true, TOUCH_PAD_THRESHOLD_MAX);