From 2a4bf0197c1c980e15eca7b8f4e4f4e4043b5eb1 Mon Sep 17 00:00:00 2001 From: Trung Tran Date: Thu, 4 Oct 2018 16:09:32 -0700 Subject: mg: fixup set_rx_antenna After going to 2 radios configuration (FPGA), the channnel value is passed into this set_rx_antenna now have value either 0 or 1. We want the mapping of {radio_channel:cpld_channel} = {0:CHAN1} or {1:CHAN2}. --- host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host') 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 d27531a2b..952cebdf8 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp @@ -199,7 +199,7 @@ void magnesium_radio_ctrl_impl::set_rx_antenna( UHD_LOG_TRACE(unique_id(), "Setting RX antenna to " << ant << " for chan " << chan); magnesium_cpld_ctrl::chan_sel_t chan_sel = - chan ? magnesium_cpld_ctrl::CHAN1 : magnesium_cpld_ctrl::CHAN2; + chan == 0 ? magnesium_cpld_ctrl::CHAN1 : magnesium_cpld_ctrl::CHAN2; _update_atr_switches(chan_sel, RX_DIRECTION, ant); radio_ctrl_impl::set_rx_antenna(ant, chan); -- cgit v1.2.3