1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 19:32:19 +01:00

use PRIx macros for printing u32/i32 ints (#4671)

This fix compilation issues with the latest esp-idf.
This commit is contained in:
Jörg Thalheim
2023-04-10 23:20:02 +01:00
committed by GitHub
parent b56fa8c50a
commit 421ebcc8b2
9 changed files with 27 additions and 18 deletions

View File

@@ -1,4 +1,5 @@
#include "wifi_component.h"
#include <cinttypes>
#if defined(USE_ESP32) || defined(USE_ESP_IDF)
#include <esp_wifi.h>
@@ -370,7 +371,7 @@ void WiFiComponent::print_connect_params_() {
if (this->selected_ap_.get_bssid().has_value()) {
ESP_LOGV(TAG, " Priority: %.1f", this->get_sta_priority(*this->selected_ap_.get_bssid()));
}
ESP_LOGCONFIG(TAG, " Channel: %d", wifi_channel_());
ESP_LOGCONFIG(TAG, " Channel: %" PRId32, wifi_channel_());
ESP_LOGCONFIG(TAG, " Subnet: %s", wifi_subnet_mask_().str().c_str());
ESP_LOGCONFIG(TAG, " Gateway: %s", wifi_gateway_ip_().str().c_str());
ESP_LOGCONFIG(TAG, " DNS1: %s", wifi_dns_ip_(0).str().c_str());