diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_PulsedLightLRF.cpp b/libraries/AP_RangeFinder/AP_RangeFinder_PulsedLightLRF.cpp index 5ceb1925c0..dbb4ace8aa 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_PulsedLightLRF.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder_PulsedLightLRF.cpp @@ -207,7 +207,7 @@ bool AP_RangeFinder_PulsedLightLRF::init(void) } } - printf("Found LidarLite device=0x%x v2=%d v3hp=%d\n", _dev->get_bus_id(), (int)v2_hardware, (int)v3hp_hardware); + printf("Found LidarLite device=0x%x v2=%d v3hp=%d\n", unsigned(_dev->get_bus_id()), (int)v2_hardware, (int)v3hp_hardware); _dev->get_semaphore()->give(); diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_VL53L0X.cpp b/libraries/AP_RangeFinder/AP_RangeFinder_VL53L0X.cpp index a5f32ce06b..2286532cc3 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_VL53L0X.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder_VL53L0X.cpp @@ -259,7 +259,7 @@ bool AP_RangeFinder_VL53L0X::check_id(void) v2 != 0xAA) { return false; } - printf("Detected VL53L0X on bus 0x%x\n", dev->get_bus_id()); + printf("Detected VL53L0X on bus 0x%x\n", unsigned(dev->get_bus_id())); return true; } diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_VL53L1X.cpp b/libraries/AP_RangeFinder/AP_RangeFinder_VL53L1X.cpp index c444546239..97e778eb70 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_VL53L1X.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder_VL53L1X.cpp @@ -81,7 +81,7 @@ bool AP_RangeFinder_VL53L1X::check_id(void) (v2 != 0xCC)) { return false; } - printf("Detected VL53L1X on bus 0x%x\n", dev->get_bus_id()); + printf("Detected VL53L1X on bus 0x%x\n", unsigned(dev->get_bus_id())); return true; }