Skip to content

Commit 91c3488

Browse files
committed
Fix PID output of list_devices_node
1 parent ba9c54b commit 91c3488

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

orbbec_camera/tools/list_devices_node.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ int main() {
2929
std::string serial = device_info->serialNumber();
3030
std::string uid = device_info->uid();
3131
auto usb_port = orbbec_camera::parseUsbPort(uid);
32+
std::stringstream pid_hex;
33+
pid_hex<< std::hex << std::setw(4) << std::setfill('0') << device_info->getPid();
3234
RCLCPP_INFO_STREAM(rclcpp::get_logger("list_device_node"),
3335
"- Name: " << device_info->getName() << ", PID: 0x"
34-
<< device_info->getPid() << ", SN/ID: " << serial
36+
<< pid_hex.str() << ", SN/ID: " << serial
3537
<< ", Connection: " << device_info->getConnectionType());
3638
RCLCPP_INFO_STREAM(rclcpp::get_logger("list_device_node"), "serial: " << serial);
3739
RCLCPP_INFO_STREAM(rclcpp::get_logger("list_device_node"), "usb port: " << usb_port);

0 commit comments

Comments
 (0)