mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
uhd: fix subdevice selection order in txrx_loopback_to_file example
This commit is contained in:
parent
f75b099259
commit
c3104d1415
@ -251,6 +251,10 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
|
||||
std::cout << boost::format("Creating the receive usrp device with: %s...") % rx_args << std::endl;
|
||||
uhd::usrp::multi_usrp::sptr rx_usrp = uhd::usrp::multi_usrp::make(rx_args);
|
||||
|
||||
//always select the subdevice first, the channel mapping affects the other settings
|
||||
if (vm.count("tx-subdev")) tx_usrp->set_tx_subdev_spec(tx_subdev);
|
||||
if (vm.count("rx-subdev")) rx_usrp->set_rx_subdev_spec(rx_subdev);
|
||||
|
||||
//detect which channels to use
|
||||
std::vector<std::string> tx_channel_strings;
|
||||
std::vector<size_t> tx_channel_nums;
|
||||
@ -277,10 +281,6 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
|
||||
tx_usrp->set_clock_source(ref);
|
||||
rx_usrp->set_clock_source(ref);
|
||||
|
||||
//always select the subdevice first, the channel mapping affects the other settings
|
||||
if (vm.count("tx-subdev")) tx_usrp->set_tx_subdev_spec(tx_subdev);
|
||||
if (vm.count("rx-subdev")) rx_usrp->set_rx_subdev_spec(rx_subdev);
|
||||
|
||||
std::cout << boost::format("Using TX Device: %s") % tx_usrp->get_pp_string() << std::endl;
|
||||
std::cout << boost::format("Using RX Device: %s") % rx_usrp->get_pp_string() << std::endl;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user