mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-31 18:18:27 +02:00
Fix compile with latest esp-idf on esp32c6 (#5677)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "tof10120_sensor.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/hal.h"
|
||||
#include <cinttypes>
|
||||
|
||||
// Very basic support for TOF10120 distance sensor
|
||||
|
||||
@@ -44,7 +45,7 @@ void TOF10120Sensor::update() {
|
||||
}
|
||||
|
||||
uint32_t distance_mm = (data[0] << 8) | data[1];
|
||||
ESP_LOGI(TAG, "Data read: %dmm", distance_mm);
|
||||
ESP_LOGI(TAG, "Data read: %" PRIu32 "mm", distance_mm);
|
||||
|
||||
if (distance_mm == TOF10120_OUT_OF_RANGE_VALUE) {
|
||||
ESP_LOGW(TAG, "Distance measurement out of range");
|
||||
|
||||
Reference in New Issue
Block a user