From 9da74c77882f416ca56f1738b315982353e887d9 Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Thu, 7 Nov 2024 09:32:48 +0200 Subject: [PATCH] Identify D555 by name, not pid --- common/d500-on-chip-calib.cpp | 3 ++- common/device-model.cpp | 6 +++--- src/ds/d500/d500-auto-calibration.cpp | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/common/d500-on-chip-calib.cpp b/common/d500-on-chip-calib.cpp index 5f36a508c6..59b7c29b73 100644 --- a/common/d500-on-chip-calib.cpp +++ b/common/d500-on-chip-calib.cpp @@ -88,7 +88,8 @@ namespace rs2 auto depth_sensor = _sub->s->as (); // 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(depth_sensor, RS2_OPTION_VISUAL_PRESET, 1); diff --git a/common/device-model.cpp b/common/device-model.cpp index 319425eda3..72d37d2bb6 100644 --- a/common/device-model.cpp +++ b/common/device-model.cpp @@ -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; } diff --git a/src/ds/d500/d500-auto-calibration.cpp b/src/ds/d500/d500-auto-calibration.cpp index d461d2be9b..d53d303752 100644 --- a/src/ds/d500/d500-auto-calibration.cpp +++ b/src/ds/d500/d500-auto-calibration.cpp @@ -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 )