Fix compile errors on ESP32-C6 with latest ESP-IDF (#6822)

* Use <cinttypes> PRI macros to fix ESP32-C6 compile

* Fix compile error on latest ESP-IDF framework & platform
This commit is contained in:
DAVe3283
2024-05-28 13:40:34 -06:00
committed by GitHub
parent 497cf8742f
commit db6f6f0cb7
11 changed files with 73 additions and 56 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
#include "he60r.h"
#include "esphome/core/hal.h"
#include "esphome/core/log.h"
#include <cinttypes>
namespace esphome {
namespace he60r {
@@ -127,7 +128,7 @@ void HE60rCover::update_() {
if (toggles_needed_ != 0) {
if ((this->counter_++ & 0x3) == 0) {
toggles_needed_--;
ESP_LOGD(TAG, "Writing byte 0x30, still needed=%d", toggles_needed_);
ESP_LOGD(TAG, "Writing byte 0x30, still needed=%" PRIu32, toggles_needed_);
this->write_byte(TOGGLE_BYTE);
} else {
this->write_byte(QUERY_BYTE);