mirror of
https://github.com/esphome/esphome.git
synced 2026-05-23 03:06:05 +08:00
[esp32_touch] Fix clang-tidy: remove trailing underscore from static methods
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,8 +16,8 @@ static const char *const TAG = "esp32_touch";
|
||||
// V2/V3: called from ISR context
|
||||
// xQueueSendFromISR is safe from both contexts.
|
||||
|
||||
bool IRAM_ATTR ESP32TouchComponent::on_active_cb_(touch_sensor_handle_t handle, const touch_active_event_data_t *event,
|
||||
void *ctx) {
|
||||
bool IRAM_ATTR ESP32TouchComponent::on_active_cb(touch_sensor_handle_t handle, const touch_active_event_data_t *event,
|
||||
void *ctx) {
|
||||
auto *comp = static_cast<ESP32TouchComponent *>(ctx);
|
||||
TouchEvent te{event->chan_id, true};
|
||||
BaseType_t higher = pdFALSE;
|
||||
@@ -26,8 +26,8 @@ bool IRAM_ATTR ESP32TouchComponent::on_active_cb_(touch_sensor_handle_t handle,
|
||||
return higher == pdTRUE;
|
||||
}
|
||||
|
||||
bool IRAM_ATTR ESP32TouchComponent::on_inactive_cb_(touch_sensor_handle_t handle,
|
||||
const touch_inactive_event_data_t *event, void *ctx) {
|
||||
bool IRAM_ATTR ESP32TouchComponent::on_inactive_cb(touch_sensor_handle_t handle,
|
||||
const touch_inactive_event_data_t *event, void *ctx) {
|
||||
auto *comp = static_cast<ESP32TouchComponent *>(ctx);
|
||||
TouchEvent te{event->chan_id, false};
|
||||
BaseType_t higher = pdFALSE;
|
||||
@@ -187,8 +187,8 @@ void ESP32TouchComponent::setup() {
|
||||
|
||||
// Register callbacks
|
||||
touch_event_callbacks_t cbs = {};
|
||||
cbs.on_active = on_active_cb_;
|
||||
cbs.on_inactive = on_inactive_cb_;
|
||||
cbs.on_active = on_active_cb;
|
||||
cbs.on_inactive = on_inactive_cb;
|
||||
err = touch_sensor_register_callbacks(this->sens_handle_, &cbs, this);
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Failed to register callbacks: %s", esp_err_to_name(err));
|
||||
|
||||
@@ -120,8 +120,8 @@ class ESP32TouchComponent : public Component {
|
||||
void check_and_disable_loop_if_all_released_(size_t pads_off);
|
||||
|
||||
// Unified callbacks for new API
|
||||
static bool on_active_cb_(touch_sensor_handle_t handle, const touch_active_event_data_t *event, void *ctx);
|
||||
static bool on_inactive_cb_(touch_sensor_handle_t handle, const touch_inactive_event_data_t *event, void *ctx);
|
||||
static bool on_active_cb(touch_sensor_handle_t handle, const touch_active_event_data_t *event, void *ctx);
|
||||
static bool on_inactive_cb(touch_sensor_handle_t handle, const touch_inactive_event_data_t *event, void *ctx);
|
||||
|
||||
// Common members
|
||||
std::vector<ESP32TouchBinarySensor *> children_;
|
||||
|
||||
Reference in New Issue
Block a user