mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-02 02:58:26 +02: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:
@@ -1,5 +1,6 @@
|
||||
#include "mhz19.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace mhz19 {
|
||||
@@ -32,7 +33,7 @@ void MHZ19Component::update() {
|
||||
uint32_t now_ms = millis();
|
||||
uint32_t warmup_ms = this->warmup_seconds_ * 1000;
|
||||
if (now_ms < warmup_ms) {
|
||||
ESP_LOGW(TAG, "MHZ19 warming up, %ds left", (warmup_ms - now_ms) / 1000);
|
||||
ESP_LOGW(TAG, "MHZ19 warming up, %" PRIu32 " s left", (warmup_ms - now_ms) / 1000);
|
||||
this->status_set_warning();
|
||||
return;
|
||||
}
|
||||
@@ -110,7 +111,7 @@ void MHZ19Component::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, " Automatic baseline calibration disabled on boot");
|
||||
}
|
||||
|
||||
ESP_LOGCONFIG(TAG, " Warmup seconds: %ds", this->warmup_seconds_);
|
||||
ESP_LOGCONFIG(TAG, " Warmup time: %" PRIu32 " s", this->warmup_seconds_);
|
||||
}
|
||||
|
||||
} // namespace mhz19
|
||||
|
||||
Reference in New Issue
Block a user