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

correcting syntax when checking if connection type is GMSL #13654

Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions common/device-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2248,8 +2248,8 @@ namespace rs2
ImGui::Text(" %s", ss.str().c_str());
if (dev.supports(RS2_CAMERA_INFO_CONNECTION_TYPE))
{
auto connection_type = dev.get_info(RS2_CAMERA_INFO_CONNECTION_TYPE);
if (connection_type == std::string("USB") && dev.supports(RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR))
std::string connection_type = dev.get_info(RS2_CAMERA_INFO_CONNECTION_TYPE);
if (connection_type == "USB" && dev.supports(RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR))
{
std::string desc = dev.get_info(RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR);
ss.str("");
Expand Down
4 changes: 2 additions & 2 deletions tools/depth-quality/depth-quality-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ namespace rs2
auto dev = devices[0];
if (dev.supports(RS2_CAMERA_INFO_CONNECTION_TYPE))
{
auto connection_type = dev.get_info(RS2_CAMERA_INFO_CONNECTION_TYPE);
if (connection_type == std::string("USB") && dev.supports(RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR))
std::string connection_type = dev.get_info(RS2_CAMERA_INFO_CONNECTION_TYPE);
if (connection_type == "USB" && dev.supports(RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR))
{
std::string usb_type = dev.get_info(RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR);
usb2_device = (std::string::npos != usb_type.find("2."));
Expand Down
2 changes: 1 addition & 1 deletion tools/fw-update/rs-fw-update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ bool is_mipi_device( const rs2::device & dev )
bool is_mipi_device = false;
if (dev.supports(RS2_CAMERA_INFO_CONNECTION_TYPE))
{
auto connection_type = dev.get_info(RS2_CAMERA_INFO_CONNECTION_TYPE);
std::string connection_type = dev.get_info(RS2_CAMERA_INFO_CONNECTION_TYPE);
if (connection_type == "GMSL")
is_mipi_device = true;
}
Expand Down
Loading