mirror of
https://github.com/esphome/esphome.git
synced 2025-09-14 17:22:20 +01:00
lint
This commit is contained in:
@@ -68,9 +68,9 @@ class ESP32TouchComponent : public Component {
|
||||
// Common helper methods
|
||||
void dump_config_base_();
|
||||
void dump_config_sensors_();
|
||||
bool create_touch_queue();
|
||||
void cleanup_touch_queue();
|
||||
void configure_wakeup_pads();
|
||||
bool create_touch_queue_();
|
||||
void cleanup_touch_queue_();
|
||||
void configure_wakeup_pads_();
|
||||
|
||||
// Common members
|
||||
std::vector<ESP32TouchBinarySensor *> children_;
|
||||
|
@@ -33,7 +33,7 @@ void ESP32TouchComponent::dump_config_sensors_() {
|
||||
}
|
||||
}
|
||||
|
||||
bool ESP32TouchComponent::create_touch_queue() {
|
||||
bool ESP32TouchComponent::create_touch_queue_() {
|
||||
// Queue size calculation: children * 4 allows for burst scenarios where ISR
|
||||
// fires multiple times before main loop processes.
|
||||
size_t queue_size = this->children_.size() * 4;
|
||||
@@ -54,14 +54,14 @@ bool ESP32TouchComponent::create_touch_queue() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void ESP32TouchComponent::cleanup_touch_queue() {
|
||||
void ESP32TouchComponent::cleanup_touch_queue_() {
|
||||
if (this->touch_queue_) {
|
||||
vQueueDelete(this->touch_queue_);
|
||||
this->touch_queue_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void ESP32TouchComponent::configure_wakeup_pads() {
|
||||
void ESP32TouchComponent::configure_wakeup_pads_() {
|
||||
bool is_wakeup_source = false;
|
||||
|
||||
// Check if any pad is configured for wakeup
|
||||
|
@@ -23,7 +23,7 @@ void ESP32TouchComponent::setup() {
|
||||
// Queue size calculation: children * 4 allows for burst scenarios where ISR
|
||||
// fires multiple times before main loop processes. This is important because
|
||||
// ESP32 v1 scans all pads on each interrupt, potentially sending multiple events.
|
||||
if (!this->create_touch_queue()) {
|
||||
if (!this->create_touch_queue_()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ void ESP32TouchComponent::setup() {
|
||||
esp_err_t err = touch_pad_isr_register(touch_isr_handler, this);
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Failed to register touch ISR: %s", esp_err_to_name(err));
|
||||
this->cleanup_touch_queue();
|
||||
this->cleanup_touch_queue_();
|
||||
this->mark_failed();
|
||||
return;
|
||||
}
|
||||
@@ -187,7 +187,7 @@ void ESP32TouchComponent::on_shutdown() {
|
||||
}
|
||||
|
||||
// Configure wakeup pads if any are set
|
||||
this->configure_wakeup_pads();
|
||||
this->configure_wakeup_pads_();
|
||||
}
|
||||
|
||||
void IRAM_ATTR ESP32TouchComponent::touch_isr_handler(void *arg) {
|
||||
|
Reference in New Issue
Block a user