aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-11-08 17:34:35 -0800
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:05:05 -0800
commit34dbd5e60090cf9138ff51988c4460df1888fb2c (patch)
tree3357fef4f5e58ba46192289387629fba462483f0 /host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
parente88169017333f590ef6980652a8054a41f729568 (diff)
downloaduhd-34dbd5e60090cf9138ff51988c4460df1888fb2c.tar.gz
uhd-34dbd5e60090cf9138ff51988c4460df1888fb2c.tar.bz2
uhd-34dbd5e60090cf9138ff51988c4460df1888fb2c.zip
mg: Enable CAL and LO-CAL "antenna" inputs
For consistency, the LO-CAL antenna name is actually "LOCAL" (without the dash).
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp')
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
index e2fe1e51b..93f9a25b9 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
@@ -143,12 +143,12 @@ void magnesium_radio_ctrl_impl::set_rx_antenna(
const size_t chan
) {
UHD_ASSERT_THROW(chan <= MAGNESIUM_NUM_CHANS);
- // TODO can we please not hardcode the antenna names here?
- // We need a map somewhere, anyway, to store the available options in the
- // prop tree.
- if (ant != "RX2" and ant != "TX/RX") {
+ if (std::find(MAGNESIUM_RX_ANTENNAS.begin(),
+ MAGNESIUM_RX_ANTENNAS.end(),
+ ant) == MAGNESIUM_RX_ANTENNAS.end()) {
throw uhd::value_error(str(
boost::format("[%s] Requesting invalid RX antenna value: %s")
+ % unique_id()
% ant
));
}