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

Identify D555 by name and some minor changes #13520

Merged
merged 3 commits into from
Nov 19, 2024
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
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
11 changes: 9 additions & 2 deletions src/dds/rsdds-device-factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,15 @@ class rsdds_watcher_singleton
_device_watcher->on_device_added(
[this]( std::shared_ptr< realdds::dds_device > const & dev )
{
dev->wait_until_ready(); // make sure handshake is complete
_callbacks.raise( dev, true );
try
{
dev->wait_until_ready(); // make sure handshake is complete, might throw
_callbacks.raise( dev, true );
}
catch (std::runtime_error e)
{
LOG_ERROR( "Discovered DDS device failed to be ready within timeout" << e.what() );
}
} );

_device_watcher->on_device_removed( [this]( std::shared_ptr< realdds::dds_device > const & dev )
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
2 changes: 1 addition & 1 deletion tools/enumerate-devices/rs-enumerate-devices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ int main(int argc, char** argv) try
if( !device_count )
{
cout << "No device detected. Is it plugged in?\n";
return EXIT_SUCCESS;
return EXIT_FAILURE;
}

if (short_view || compact_view)
Expand Down
Loading