From cf990eb467f2c7d2202ad1f23596e4e795da9c02 Mon Sep 17 00:00:00 2001 From: Itay Shoshani <5647956+itay-sho@users.noreply.github.com> Date: Sat, 26 Oct 2024 09:47:32 +0300 Subject: [PATCH] fix: using correct int types to reduce compilation warnings / errors required due to the fact that esp32-c6 compiler raises errors due to that --- components/aux_ac/aux_ac.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/aux_ac/aux_ac.h b/components/aux_ac/aux_ac.h index 27f3cc4..3bc30cd 100644 --- a/components/aux_ac/aux_ac.h +++ b/components/aux_ac/aux_ac.h @@ -5,6 +5,7 @@ #pragma once #include +#include #ifndef F #define F(string_literal) (string_literal) #endif @@ -1714,7 +1715,7 @@ namespace esphome // заполняем время получения пакета memset(textBuf, 0, 11); - sprintf(textBuf, "%010u", packet->msec); + sprintf(textBuf, "%010" PRIu32, packet->msec); st = st + textBuf + ": "; // формируем преамбулы @@ -2843,11 +2844,11 @@ namespace esphome { ESP_LOGCONFIG(TAG, "AUX HVAC:"); ESP_LOGCONFIG(TAG, " [x] Firmware version: %s", Constants::AC_FIRMWARE_VERSION.c_str()); - ESP_LOGCONFIG(TAG, " [x] Period: %dms", this->get_period()); + ESP_LOGCONFIG(TAG, " [x] Period: %" PRIu32 "ms", this->get_period()); ESP_LOGCONFIG(TAG, " [x] Show action: %s", TRUEFALSE(this->get_show_action())); ESP_LOGCONFIG(TAG, " [x] Display inverted: %s", TRUEFALSE(this->get_display_inverted())); ESP_LOGCONFIG(TAG, " [x] Optimistic: %s", TRUEFALSE(this->get_optimistic())); - ESP_LOGCONFIG(TAG, " [x] Packet timeout: %dms", this->get_packet_timeout()); + ESP_LOGCONFIG(TAG, " [x] Packet timeout: %" PRIu32 "ms", this->get_packet_timeout()); #if defined(PRESETS_SAVING) ESP_LOGCONFIG(TAG, " [x] Save settings %s", TRUEFALSE(this->get_store_settings()));