aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/UHDDevice.cpp
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2015-06-07 01:07:45 -0400
committerTom Tsou <tom.tsou@ettus.com>2015-07-30 14:19:06 -0700
commit50747dc65d2f7046c427c2c846d0315781f2f249 (patch)
tree33f4fd250082f2b51a48224090ca8930931d0fc2 /Transceiver52M/UHDDevice.cpp
parent1e9b4d57dad26785f5920306963338175d162910 (diff)
osmo-trx: Add an option to swap channels on UmTRX.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Diffstat (limited to 'Transceiver52M/UHDDevice.cpp')
-rw-r--r--Transceiver52M/UHDDevice.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp
index 9043318..9038bc1 100644
--- a/Transceiver52M/UHDDevice.cpp
+++ b/Transceiver52M/UHDDevice.cpp
@@ -290,7 +290,7 @@ public:
uhd_device(size_t sps, size_t chans, bool diversity, double offset);
~uhd_device();
- int open(const std::string &args, bool extref);
+ int open(const std::string &args, bool extref, bool swap_channels);
bool start();
bool stop();
bool restart();
@@ -694,7 +694,7 @@ bool uhd_device::parse_dev_type()
return true;
}
-int uhd_device::open(const std::string &args, bool extref)
+int uhd_device::open(const std::string &args, bool extref, bool swap_channels)
{
// Find UHD devices
uhd::device_addr_t addr(args);
@@ -720,7 +720,7 @@ int uhd_device::open(const std::string &args, bool extref)
// Verify and set channels
if ((dev_type == B210) && (chans == 2)) {
} else if ((dev_type == UMTRX) && (chans == 2)) {
- uhd::usrp::subdev_spec_t subdev_spec("A:0 B:0");
+ uhd::usrp::subdev_spec_t subdev_spec(swap_channels?"B:0 A:0":"A:0 B:0");
usrp_dev->set_tx_subdev_spec(subdev_spec);
usrp_dev->set_rx_subdev_spec(subdev_spec);
} else if (chans != 1) {