Skip to content

Commit

Permalink
Identify D555 by name, not pid
Browse files Browse the repository at this point in the history
  • Loading branch information
OhadMeir committed Nov 17, 2024
1 parent fec7a5d commit 9da74c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion common/d500-on-chip-calib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ namespace rs2
auto depth_sensor = _sub->s->as <rs2::depth_sensor>();

// disabling the depth visual preset change for D555 - not needed
if (get_device_pid() != "0B56" && get_device_pid() != "DDS")
std::string dev_name = _dev.supports( RS2_CAMERA_INFO_NAME ) ? _dev.get_info( RS2_CAMERA_INFO_NAME ) : "";
if( dev_name.find( "D555" ) == std::string::npos )
{
// set depth preset as default preset
set_option_if_needed<rs2::depth_sensor>(depth_sensor, RS2_OPTION_VISUAL_PRESET, 1);
Expand Down
6 changes: 3 additions & 3 deletions common/device-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3351,10 +3351,10 @@ namespace rs2
{
bool is_d555 = false;

if( dev.supports( RS2_CAMERA_INFO_PRODUCT_ID ) )
if( dev.supports( RS2_CAMERA_INFO_NAME ) )
{
auto pid_str = std::string( dev.get_info( RS2_CAMERA_INFO_PRODUCT_ID ) );
if( pid_str == "0B56" || pid_str == "DDS" )
auto dev_name = std::string( dev.get_info( RS2_CAMERA_INFO_NAME ) );
if( dev_name.find( "D555" ) != std::string::npos )
is_d555 = true;
}

Expand Down
4 changes: 2 additions & 2 deletions src/ds/d500/d500-auto-calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ namespace librealsense
{
bool is_d555 = false;
auto dev = As< device >( _debug_dev );
std::string pid_str = dev ? dev->get_info( RS2_CAMERA_INFO_PRODUCT_ID ) : "";
if( pid_str == "0B56" || pid_str == "DDS" )
std::string dev_name = dev ? dev->get_info( RS2_CAMERA_INFO_NAME ) : "";
if( dev_name.find( "D555" ) != std::string::npos )
is_d555 = true;

if( is_d555 )
Expand Down

0 comments on commit 9da74c7

Please sign in to comment.