From 381222c95d16e114594e87cd0cee58d40d14dee7 Mon Sep 17 00:00:00 2001 From: Jonathan Swoboda Date: Tue, 24 Sep 2024 14:30:03 -0400 Subject: [PATCH] Use PRIu32 for unsigned --- esphome/components/sx127x/sx127x.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/esphome/components/sx127x/sx127x.cpp b/esphome/components/sx127x/sx127x.cpp index 1ec5b4216b..e3bf94a2eb 100644 --- a/esphome/components/sx127x/sx127x.cpp +++ b/esphome/components/sx127x/sx127x.cpp @@ -1,5 +1,7 @@ #include "sx127x.h" +#include + namespace esphome { namespace sx127x { @@ -129,14 +131,14 @@ void SX127x::dump_config() { LOG_PIN(" NSS Pin: ", this->nss_pin_); LOG_PIN(" RST Pin: ", this->rst_pin_); ESP_LOGCONFIG(TAG, " PA Pin: %s", this->pa_pin_ == PA_PIN_BOOST ? "BOOST" : "RFO"); - ESP_LOGCONFIG(TAG, " PA Power: %u dBm", this->pa_power_); + ESP_LOGCONFIG(TAG, " PA Power: %" PRIu32 " dBm", this->pa_power_); ESP_LOGCONFIG(TAG, " Frequency: %f MHz", (float) this->frequency_ / 1000000); ESP_LOGCONFIG(TAG, " Modulation: %s", this->modulation_ == MOD_FSK ? "FSK" : "OOK"); ESP_LOGCONFIG(TAG, " Rx Bandwidth: %.1f kHz", (float) rx_bw / 1000); ESP_LOGCONFIG(TAG, " Rx Start: %s", this->rx_start_ ? "true" : "false"); ESP_LOGCONFIG(TAG, " Rx Floor: %.1f dBm", this->rx_floor_); - ESP_LOGCONFIG(TAG, " FSK Fdev: %u Hz", this->fsk_fdev_); - ESP_LOGCONFIG(TAG, " FSK Ramp: %u us", RAMP_LUT[this->fsk_ramp_]); + ESP_LOGCONFIG(TAG, " FSK Fdev: %" PRIu32 " Hz", this->fsk_fdev_); + ESP_LOGCONFIG(TAG, " FSK Ramp: %" PRIu32 " us", RAMP_LUT[this->fsk_ramp_]); if (this->fsk_shaping_ == SHAPING_BT_1_0) { ESP_LOGCONFIG(TAG, " FSK Shaping: BT_1_0"); } else if (this->fsk_shaping_ == SHAPING_BT_0_5) {