From 34dbd5e60090cf9138ff51988c4460df1888fb2c Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 8 Nov 2017 17:34:35 -0800 Subject: mg: Enable CAL and LO-CAL "antenna" inputs For consistency, the LO-CAL antenna name is actually "LOCAL" (without the dash). --- host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp') 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 )); } -- cgit v1.2.3