Skip to content

Commit

Permalink
Merge pull request #3203 from abernste/T265_info_adjustments
Browse files Browse the repository at this point in the history
T265 info adjustments
  • Loading branch information
dorodnic authored Feb 4, 2019
2 parents b447f19 + 6000767 commit ecb9727
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/tm2/tm-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -993,15 +993,16 @@ namespace librealsense
{
throw io_exception("Failed to get device info");
}

std::string vendorIdStr = to_string() << std::hex << info.usbDescriptor.idVendor;
std::string productIdStr = to_string() << std::hex << info.usbDescriptor.idProduct;

register_info(RS2_CAMERA_INFO_NAME, tm2_device_name());
register_info(RS2_CAMERA_INFO_SERIAL_NUMBER, to_string() << std::hex << (info.serialNumber >> 16));
register_info(RS2_CAMERA_INFO_FIRMWARE_VERSION, to_string() << info.version.fw.major << "." << info.version.fw.minor << "." << info.version.fw.patch << "." << info.version.fw.build);
register_info(RS2_CAMERA_INFO_PRODUCT_ID, to_string() << info.usbDescriptor.idProduct);
std::string device_path =
std::string("vid_") + std::to_string(info.usbDescriptor.idVendor) +
std::string(" pid_") + std::to_string(info.usbDescriptor.idProduct) +
std::string(" bus_") + std::to_string(info.usbDescriptor.bus) +
std::string(" port_") + std::to_string(info.usbDescriptor.port);
register_info(RS2_CAMERA_INFO_PRODUCT_ID, productIdStr);

std::string device_path = std::string("vid_") + vendorIdStr + std::string(" pid_") + productIdStr + std::string(" bus_") + std::to_string(info.usbDescriptor.bus) + std::string(" port_") + std::to_string(info.usbDescriptor.port);
register_info(RS2_CAMERA_INFO_PHYSICAL_PORT, device_path);

_sensor = std::make_shared<tm2_sensor>(this, dev);
Expand Down

0 comments on commit ecb9727

Please sign in to comment.