mirror of
https://github.com/esphome/esphome.git
synced 2025-09-14 17:22:20 +01:00
cleanup
This commit is contained in:
@@ -309,7 +309,6 @@ void ESP32TouchComponent::loop() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// In setup mode, periodically log all pad values
|
||||
if (this->setup_mode_ && now - this->setup_mode_last_log_print_ > SETUP_MODE_LOG_INTERVAL_MS) {
|
||||
@@ -323,8 +322,8 @@ if (this->setup_mode_ && now - this->setup_mode_last_log_print_ > SETUP_MODE_LOG
|
||||
|
||||
if (this->filter_configured_()) {
|
||||
touch_pad_filter_read_smooth(child->get_touch_pad(), &smooth);
|
||||
ESP_LOGD(TAG, " Pad T%d: raw=%d, benchmark=%d, smooth=%d, threshold=%d", child->get_touch_pad(), raw, benchmark,
|
||||
smooth, child->get_threshold());
|
||||
ESP_LOGD(TAG, " Pad T%d: raw=%d, benchmark=%d, smooth=%d, threshold=%d", child->get_touch_pad(), raw,
|
||||
benchmark, smooth, child->get_threshold());
|
||||
} else {
|
||||
ESP_LOGD(TAG, " Pad T%d: raw=%d, benchmark=%d, threshold=%d", child->get_touch_pad(), raw, benchmark,
|
||||
child->get_threshold());
|
||||
@@ -335,8 +334,8 @@ if (this->setup_mode_ && now - this->setup_mode_last_log_print_ > SETUP_MODE_LOG
|
||||
|
||||
void ESP32TouchComponent::on_shutdown() {
|
||||
// Disable interrupts
|
||||
touch_pad_intr_disable(static_cast<touch_pad_intr_mask_t>(TOUCH_PAD_INTR_MASK_ACTIVE | TOUCH_PAD_INTR_MASK_INACTIVE |
|
||||
TOUCH_PAD_INTR_MASK_TIMEOUT));
|
||||
touch_pad_intr_disable(static_cast<touch_pad_intr_mask_t>(
|
||||
TOUCH_PAD_INTR_MASK_ACTIVE | TOUCH_PAD_INTR_MASK_INACTIVE | TOUCH_PAD_INTR_MASK_TIMEOUT));
|
||||
touch_pad_isr_deregister(touch_isr_handler, this);
|
||||
if (this->touch_queue_) {
|
||||
vQueueDelete(this->touch_queue_);
|
||||
|
Reference in New Issue
Block a user