mirror of
https://github.com/esphome/esphome.git
synced 2025-02-07 05:30:54 +00:00
[esp32_touch] Fix deprecated warning (#8092)
Co-authored-by: Jonathan Swoboda <jonathan.swoboda>
This commit is contained in:
parent
716a8b87e1
commit
db644542ed
@ -52,7 +52,12 @@ void ESP32TouchComponent::setup() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ESP_IDF_VERSION_MAJOR >= 5
|
||||
touch_pad_set_measurement_clock_cycles(this->meas_cycle_);
|
||||
touch_pad_set_measurement_interval(this->sleep_cycle_);
|
||||
#else
|
||||
touch_pad_set_meas_time(this->sleep_cycle_, this->meas_cycle_);
|
||||
#endif
|
||||
touch_pad_set_voltage(this->high_voltage_reference_, this->low_voltage_reference_, this->voltage_attenuation_);
|
||||
|
||||
for (auto *child : this->children_) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user