diff options
author | Trung Tran <trung.tran@ettus.com> | 2018-07-13 16:00:24 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-07-14 11:21:26 -0700 |
commit | 606d8fc36de0e1812da66e48f23eb7b840b28ebb (patch) | |
tree | 36f8623b0aaa36b13df922596291056941935afb /host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp | |
parent | 8a3148eb25cfd26c4449e6e34c3cba1e41ebc500 (diff) | |
download | uhd-606d8fc36de0e1812da66e48f23eb7b840b28ebb.tar.gz uhd-606d8fc36de0e1812da66e48f23eb7b840b28ebb.tar.bz2 uhd-606d8fc36de0e1812da66e48f23eb7b840b28ebb.zip |
mg: fix tx power issue
This commit will fix power issues with 2 radios configuration (UHD 3.12+).
Removed unused _master boolean.
CPLD path are now correct, each radio has its own CPLD object.
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp')
-rw-r--r-- | host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp index 365082048..e58e1706e 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp @@ -25,9 +25,8 @@ double magnesium_radio_ctrl_impl::_set_all_gain( "freq=" << freq << " Hz, " "chan=" << chan << ", " "dir=" << dir); - const size_t ad9371_chan = _master ? 0 : 1; ;// FIXME: use chan when 2 radios - const magnesium_cpld_ctrl::chan_sel_t chan_sel = - _master ? magnesium_cpld_ctrl::CHAN1 : magnesium_cpld_ctrl::CHAN2; + const size_t ad9371_chan = chan; + auto chan_sel = static_cast<magnesium_cpld_ctrl::chan_sel_t>(chan); gain_tuple_t gain_tuple = (dir == RX_DIRECTION) ? get_rx_gain_tuple(gain, _map_freq_to_rx_band(freq)): get_tx_gain_tuple(gain, _map_freq_to_tx_band(freq)); |