1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-24 22:22:22 +01:00

IDF 5 fixes for various components from test1.yaml (#5451)

This commit is contained in:
Keith Burzinski
2023-10-18 01:33:36 -05:00
committed by GitHub
parent 8ef743f25e
commit cdc4f7f59b
82 changed files with 173 additions and 97 deletions

View File

@@ -30,7 +30,7 @@ void UltrasonicSensorComponent::update() {
;
const uint32_t pulse_end = micros();
ESP_LOGV(TAG, "Echo took %uµs", pulse_end - pulse_start);
ESP_LOGV(TAG, "Echo took %" PRIu32 "µs", pulse_end - pulse_start);
if (pulse_end - start >= timeout_us_) {
ESP_LOGD(TAG, "'%s' - Distance measurement timed out!", this->name_.c_str());
@@ -45,8 +45,8 @@ void UltrasonicSensorComponent::dump_config() {
LOG_SENSOR("", "Ultrasonic Sensor", this);
LOG_PIN(" Echo Pin: ", this->echo_pin_);
LOG_PIN(" Trigger Pin: ", this->trigger_pin_);
ESP_LOGCONFIG(TAG, " Pulse time: %u µs", this->pulse_time_us_);
ESP_LOGCONFIG(TAG, " Timeout: %u µs", this->timeout_us_);
ESP_LOGCONFIG(TAG, " Pulse time: %" PRIu32 " µs", this->pulse_time_us_);
ESP_LOGCONFIG(TAG, " Timeout: %" PRIu32 " µs", this->timeout_us_);
LOG_UPDATE_INTERVAL(this);
}
float UltrasonicSensorComponent::us_to_m(uint32_t us) {