Skip to content

Commit

Permalink
tools --sw-only overrides 'dds'
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Nov 26, 2023
1 parent f2a9e91 commit 6cec1da
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
7 changes: 5 additions & 2 deletions tools/enumerate-devices/rs-enumerate-devices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,11 @@ int main(int argc, char** argv) try
json settings;
#ifdef BUILD_WITH_DDS
json dds;
dds["domain"] = domain_arg.getValue();
settings["dds"] = std::move( dds );
if( domain_arg.isSet() )
dds["domain"] = domain_arg.getValue();
if( only_sw_arg.isSet() )
dds["enabled"]; // null: remove global dds:false or dds/enabled:false, if any
settings["dds"] = std::move( dds );
#endif
settings["format-conversion"] = format_arg.getValue();
context ctx( settings.dump() );
Expand Down
7 changes: 6 additions & 1 deletion tools/realsense-viewer/realsense-viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,14 @@ int main(int argc, const char** argv) try

std::shared_ptr<device_models_list> device_models = std::make_shared<device_models_list>();

nlohmann::json settings;
nlohmann::json settings = nlohmann::json::object();
if( only_sw_arg.getValue() )
{
#if defined( BUILD_WITH_DDS )
settings["dds"]["enabled"]; // null: remove global dds:false or dds/enabled:false, if any
#endif
settings["device-mask"] = RS2_PRODUCT_LINE_SW_ONLY | RS2_PRODUCT_LINE_ANY;
}

context ctx( settings.dump() );
ux_window window("Intel RealSense Viewer", ctx);
Expand Down
5 changes: 4 additions & 1 deletion tools/terminal/rs-terminal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ int main(int argc, char** argv)
nlohmann::json settings;
#ifdef BUILD_WITH_DDS
nlohmann::json dds;
dds["domain"] = domain_arg.getValue();
if( domain_arg.isSet() )
dds["domain"] = domain_arg.getValue();
if( only_sw_arg.isSet() )
dds["enabled"]; // null: remove global dds:false or dds/enabled:false, if any
settings["dds"] = std::move( dds );
#endif
if( only_sw_arg.getValue() )
Expand Down

0 comments on commit 6cec1da

Please sign in to comment.