Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T265 info adjustments #3203

Merged
merged 2 commits into from
Feb 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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