aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_impl.cpp
diff options
context:
space:
mode:
authorMark Meserve <mark.meserve@ni.com>2019-02-20 15:04:05 -0600
committerBrent Stapleton <brent.stapleton@ettus.com>2019-02-21 16:16:06 -0800
commit3b872372db27cf5c65fc2e36f7bd2fc45a070141 (patch)
tree4fb05909c2cc0f754b8a5cb910013ad4c9209617 /host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_impl.cpp
parentccddd671bded324b2752e769879e6ae645768a62 (diff)
downloaduhd-3b872372db27cf5c65fc2e36f7bd2fc45a070141.tar.gz
uhd-3b872372db27cf5c65fc2e36f7bd2fc45a070141.tar.bz2
uhd-3b872372db27cf5c65fc2e36f7bd2fc45a070141.zip
rh: revise correction data usage
- UHD's calibration utilities use the LO frequency, so this is the frequency we should be using too. - Disables loaded corrections in lowband, as the utilities will not generate valid corrections at these frequencies. Manual corrections can still be added via the property tree. - Changed corrections logging to include frequency and less certainty of the correction file's existence.
Diffstat (limited to 'host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_impl.cpp')
-rw-r--r--host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_impl.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_impl.cpp
index 36fb5bc23..a8de3aa51 100644
--- a/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_impl.cpp
@@ -227,7 +227,9 @@ double rhodium_radio_ctrl_impl::set_tx_frequency(
_rpcc->notify_with_token(_rpc_prefix + "enable_tx_lowband_lo", (!is_highband));
}
_update_tx_freq_switches(coerced_freq);
- _update_corrections(get_tx_lo_source(RHODIUM_LO1, 0), coerced_freq, TX_DIRECTION);
+ const bool enable_corrections = is_highband
+ and (get_tx_lo_source(RHODIUM_LO1, 0) == "internal");
+ _update_corrections(actual_lo_freq, TX_DIRECTION, enable_corrections);
// if TX lowband/highband changed and antenna is TX/RX,
// the ATR and SW1 need to be updated
_update_tx_output_switches(get_tx_antenna(0));
@@ -280,7 +282,9 @@ double rhodium_radio_ctrl_impl::set_rx_frequency(
_rpcc->notify_with_token(_rpc_prefix + "enable_rx_lowband_lo", (!is_highband));
}
_update_rx_freq_switches(coerced_freq);
- _update_corrections(get_rx_lo_source(RHODIUM_LO1, 0), coerced_freq, RX_DIRECTION);
+ const bool enable_corrections = is_highband
+ and (get_rx_lo_source(RHODIUM_LO1, 0) == "internal");
+ _update_corrections(actual_lo_freq, RX_DIRECTION, enable_corrections);
return coerced_freq;
}
@@ -449,20 +453,20 @@ void rhodium_radio_ctrl_impl::_update_atr(
}
void rhodium_radio_ctrl_impl::_update_corrections(
- const std::string lo_source,
const double freq,
- const direction_t dir)
+ const direction_t dir,
+ const bool enable)
{
const std::string fe_path_part = dir == RX_DIRECTION ? "rx_fe_corrections"
: "tx_fe_corrections";
const fs_path fe_corr_path = _root_path / fe_path_part / 0;
const fs_path dboard_path = fs_path("dboards") / _radio_slot;
- if (lo_source == "internal")
+ if (enable)
{
UHD_LOG_DEBUG(unique_id(),
- "Enabling frontend corrections for "
- << ((dir == RX_DIRECTION) ? "RX" : "TX"));
+ "Loading any available frontend corrections for "
+ << ((dir == RX_DIRECTION) ? "RX" : "TX") << " at " << freq);
if (dir == RX_DIRECTION) {
apply_rx_fe_corrections(_tree, dboard_path, fe_corr_path, freq);
} else {