Skip to content

Commit

Permalink
PR #13654 from remibettan: correcting syntax when checking if connect…
Browse files Browse the repository at this point in the history
…ion type is GMSL
  • Loading branch information
Nir-Az authored Jan 6, 2025
2 parents 220d03d + 491430d commit 1258860
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit 1258860

Please sign in to comment.