From e15752099f14fa5789a8faf6fd843f9a9b7e4104 Mon Sep 17 00:00:00 2001 From: Atsunori Saito Date: Tue, 19 Aug 2025 01:03:44 +0900 Subject: [PATCH] fix: correct hex format for CRC output (#25442) - switch to PRIx32 for proper hex formatting - keep zero-padding and casing consistent - ensure status prints CRC correctly --- src/drivers/px4io/px4io.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 86069b36bc..0f53b54157 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -1230,8 +1230,8 @@ int PX4IO::io_reg_modify(uint8_t page, uint8_t offset, uint16_t clearbits, uint1 int PX4IO::print_status() { /* basic configuration */ - printf("protocol %" PRIu32 " hardware %" PRIu32 " bootloader %" PRIu32 " buffer %" PRIu32 "B crc 0x%04" PRIu32 "%04" - PRIu32 "\n", + printf("protocol %" PRIu32 " hardware %" PRIu32 " bootloader %" PRIu32 " buffer %" PRIu32 "B crc 0x%04" PRIx32 "%04" + PRIx32 "\n", io_reg_get(PX4IO_PAGE_CONFIG, PX4IO_P_CONFIG_PROTOCOL_VERSION), io_reg_get(PX4IO_PAGE_CONFIG, PX4IO_P_CONFIG_HARDWARE_VERSION), io_reg_get(PX4IO_PAGE_CONFIG, PX4IO_P_CONFIG_BOOTLOADER_VERSION),