Skip to content

Commit

Permalink
fix rs-dds-config --domain-id acting bad
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Jul 25, 2024
1 parent 1e77472 commit 24d8da4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tools/dds/dds-config/rs-dds-config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,7 @@ try
ValueArg< uint32_t > link_timeout_arg( "", "link-timeout",
"Milliseconds before --eth-first link times out and falls back to USB",
false, 4000, "milliseconds" );
ValueArg< uint8_t > domain_id_arg( "", "domain-id",
"DDS Domain ID to use (default is 0)",
false, 0, "0-232" );
ValueArg< int > domain_id_arg( "", "domain-id", "DDS Domain ID to use (default is 0)", false, 0, "0-232" );
SwitchArg usb_first_arg( "", "usb-first", "Prioritize USB before Ethernet" );
SwitchArg eth_first_arg( "", "eth-first", "Prioritize Ethernet and fall back to USB after link timeout" );
SwitchArg dynamic_priority_arg( "", "dynamic-priority", "Dynamically prioritize the last-working connection method (the default)" );
Expand Down Expand Up @@ -313,7 +311,7 @@ try
requested.dhcp.timeout = dhcp_timeout_arg.getValue();
if( domain_id_arg.isSet() )
{
if( domain_id_arg.getValue() > 232 )
if( domain_id_arg.getValue() < 0 || domain_id_arg.getValue() > 232 )
throw std::invalid_argument( "--domain-id must be 0-232" );
requested.dds.domain_id = domain_id_arg.getValue();
}
Expand Down

0 comments on commit 24d8da4

Please sign in to comment.