1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-03 18:42:23 +01:00

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

View File

@@ -1,5 +1,6 @@
#include "ade7953_base.h"
#include "esphome/core/log.h"
#include <cinttypes>
namespace esphome {
namespace ade7953_base {
@@ -105,7 +106,7 @@ void ADE7953::update() {
this->last_update_ = now;
// prevent DIV/0
pf = ADE_WATTSEC_POWER_FACTOR * (diff < 10 ? 10 : diff) / 1000;
ESP_LOGVV(TAG, "ADE7953::update() diff=%d pf=%f", diff, pf);
ESP_LOGVV(TAG, "ADE7953::update() diff=%" PRIu32 " pf=%f", diff, pf);
}
// Apparent power