mirror of
https://github.com/esphome/esphome.git
synced 2026-05-23 03:06:05 +08:00
[esp32_touch] Modernize to combined namespace syntax
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,8 +7,7 @@
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace esp32_touch {
|
||||
namespace esphome::esp32_touch {
|
||||
|
||||
static const char *const TAG = "esp32_touch";
|
||||
|
||||
@@ -632,7 +631,6 @@ void ESP32TouchComponent::check_and_disable_loop_if_all_released_(size_t pads_of
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace esp32_touch
|
||||
} // namespace esphome
|
||||
} // namespace esphome::esp32_touch
|
||||
|
||||
#endif // USE_ESP32
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/queue.h>
|
||||
|
||||
namespace esphome {
|
||||
namespace esp32_touch {
|
||||
namespace esphome::esp32_touch {
|
||||
|
||||
// IMPORTANT: Touch detection logic differs between ESP32 variants:
|
||||
// - ESP32 v1 (original): Touch detected when value < threshold (absolute threshold, capacitance increase causes
|
||||
@@ -254,7 +253,6 @@ class ESP32TouchBinarySensor : public binary_sensor::BinarySensor {
|
||||
bool initial_state_published_{false};
|
||||
};
|
||||
|
||||
} // namespace esp32_touch
|
||||
} // namespace esphome
|
||||
} // namespace esphome::esp32_touch
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user