Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
remibettan committed Jan 1, 2025
1 parent 0d713ce commit 5714a40
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tools/depth-quality/depth-quality-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ namespace rs2
rs2::pipeline_profile active_profile;

// Adjust settings according to USB type
bool usb3_device = true;
bool usb_device = false;
bool usb2_device = false;
auto devices = _ctx.query_devices();
if (devices.size())
{
Expand All @@ -57,16 +56,15 @@ namespace rs2
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))
{
usb_device = true;
std::string usb_type = dev.get_info(RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR);
usb3_device = !(std::string::npos != usb_type.find("2."));
usb2_device = (std::string::npos != usb_type.find("2."));
}
}
}
else
return valid_config;

int requested_fps = (usb3_device || !usb_device) ? 30 : 15;
int requested_fps = usb2_device ? 15 : 30;

// open Depth and Infrared streams using default profile
{
Expand Down

0 comments on commit 5714a40

Please sign in to comment.