From a892ccb9d2b41daf51bb65f915945c4b58eacc86 Mon Sep 17 00:00:00 2001 From: Masterz69 Date: Tue, 2 Apr 2024 20:49:08 +0300 Subject: [PATCH] Update ultrasonic_sensor.cpp --- esphome/components/ultrasonic_uart/ultrasonic_sensor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/components/ultrasonic_uart/ultrasonic_sensor.cpp b/esphome/components/ultrasonic_uart/ultrasonic_sensor.cpp index 7e5167ea42..0a943b2934 100644 --- a/esphome/components/ultrasonic_uart/ultrasonic_sensor.cpp +++ b/esphome/components/ultrasonic_uart/ultrasonic_sensor.cpp @@ -6,8 +6,8 @@ namespace ultrasonic_uart { static const char *const TAG = "ultrasonic_uart"; -void UltrasonicSensorComponent::setup() { ESP_LOGCONFIG(TAG, "Setting up Ultrasonic Sensor..."); } -void UltrasonicSensorComponent::update() { +void UltrasonicSensorUart::setup() { ESP_LOGCONFIG(TAG, "Setting up Ultrasonic Sensor..."); } +void UltrasonicSensorUart::update() { this->write(0x55); while (this->available() == 4) { auto frame = *this->read_array<4>(); @@ -17,10 +17,10 @@ void UltrasonicSensorComponent::update() { } } } -void UltrasonicSensorComponent::dump_config() { +void UltrasonicSensorUart::dump_config() { LOG_SENSOR("", "Ultrasonic Sensor", this); LOG_UPDATE_INTERVAL(this); } -float UltrasonicSensorComponent_UART::get_setup_priority() const { return setup_priority::DATA; } +float UltrasonicSensorUart::get_setup_priority() const { return setup_priority::DATA; } } // namespace ultrasonic_uart } // namespace esphome