Skip to content

Commit

Permalink
PRt #13520 from OhadMeir/development
Browse files Browse the repository at this point in the history
  • Loading branch information
OhadMeir authored Nov 19, 2024
2 parents 8503b56 + 9da74c7 commit 3074e3c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 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
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

0 comments on commit 3074e3c

Please sign in to comment.