From 24d8da41c2716603201dd5304ece39071b0a5904 Mon Sep 17 00:00:00 2001 From: Eran Date: Wed, 17 Jul 2024 10:47:20 +0300 Subject: [PATCH] fix rs-dds-config --domain-id acting bad --- tools/dds/dds-config/rs-dds-config.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/dds/dds-config/rs-dds-config.cpp b/tools/dds/dds-config/rs-dds-config.cpp index 4aeb2dd220..253e556fcc 100644 --- a/tools/dds/dds-config/rs-dds-config.cpp +++ b/tools/dds/dds-config/rs-dds-config.cpp @@ -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)" ); @@ -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(); }