summaryrefslogtreecommitdiff
path: root/gr-uhd/lib/usrp_block_impl.cc
diff options
context:
space:
mode:
authorJacob Gilbert <jacob.gilbert@protonmail.com>2021-03-29 21:09:23 -0600
committermormj <34754695+mormj@users.noreply.github.com>2021-04-05 07:28:48 -0400
commit8b23f906844c9784c784934ae06dfdfe10d31a1f (patch)
treef2a1934c144d849f9273e919a533d13433efe787 /gr-uhd/lib/usrp_block_impl.cc
parentdeb4c4dd97cb668b399496d8edab2cfa8d69f85b (diff)
gr-uhd: update direction key naming
The 'ant_direction_' key getters have been reappropriated for wider use, changing to general 'direction_' and a few minor simplifications. Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
Diffstat (limited to 'gr-uhd/lib/usrp_block_impl.cc')
-rw-r--r--gr-uhd/lib/usrp_block_impl.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/gr-uhd/lib/usrp_block_impl.cc b/gr-uhd/lib/usrp_block_impl.cc
index 973aa96c80..1f13591e2d 100644
--- a/gr-uhd/lib/usrp_block_impl.cc
+++ b/gr-uhd/lib/usrp_block_impl.cc
@@ -122,12 +122,12 @@ const pmt::pmt_t gr::uhd::cmd_gpio_key()
return val;
}
-const pmt::pmt_t gr::uhd::ant_direction_rx()
+const pmt::pmt_t gr::uhd::direction_rx()
{
static const pmt::pmt_t val = pmt::mp("RX");
return val;
}
-const pmt::pmt_t gr::uhd::ant_direction_tx()
+const pmt::pmt_t gr::uhd::direction_tx()
{
static const pmt::pmt_t val = pmt::mp("TX");
return val;
@@ -291,14 +291,14 @@ void usrp_block_impl::_set_center_freq_from_internals_allchans()
while (_rx_chans_to_tune.any()) {
// This resets() bits, so this loop should not run indefinitely
chan = _rx_chans_to_tune.find_first();
- _set_center_freq_from_internals(chan, ant_direction_rx());
+ _set_center_freq_from_internals(chan, direction_rx());
_rx_chans_to_tune.reset(chan);
}
while (_tx_chans_to_tune.any()) {
// This resets() bits, so this loop should not run indefinitely
chan = _tx_chans_to_tune.find_first();
- _set_center_freq_from_internals(chan, ant_direction_tx());
+ _set_center_freq_from_internals(chan, direction_tx());
_tx_chans_to_tune.reset(chan);
}
}
@@ -581,7 +581,7 @@ void usrp_block_impl::_update_curr_tune_req(::uhd::tune_request_t& tune_req,
return;
}
- if (pmt::eqv(direction, ant_direction_rx())) {
+ if (pmt::eqv(direction, direction_rx())) {
if (tune_req.target_freq != _curr_rx_tune_req[chan].target_freq ||
tune_req.rf_freq_policy != _curr_rx_tune_req[chan].rf_freq_policy ||
tune_req.rf_freq != _curr_rx_tune_req[chan].rf_freq ||
@@ -637,7 +637,7 @@ void usrp_block_impl::_cmd_handler_looffset(const pmt::pmt_t& lo_offset,
double lo_offs = pmt::to_double(lo_offset);
::uhd::tune_request_t new_tune_request;
- if (pmt::eqv(direction, ant_direction_rx())) {
+ if (pmt::eqv(direction, direction_rx())) {
new_tune_request = _curr_rx_tune_req[chan];
} else {
new_tune_request = _curr_tx_tune_req[chan];
@@ -845,7 +845,7 @@ void usrp_block_impl::_cmd_handler_lofreq(const pmt::pmt_t& lofreq,
}
::uhd::tune_request_t new_tune_request;
- if (pmt::eqv(direction, ant_direction_rx())) {
+ if (pmt::eqv(direction, direction_rx())) {
new_tune_request = _curr_rx_tune_req[chan];
} else {
new_tune_request = _curr_tx_tune_req[chan];
@@ -882,7 +882,7 @@ void usrp_block_impl::_cmd_handler_dspfreq(const pmt::pmt_t& dspfreq,
}
::uhd::tune_request_t new_tune_request;
- if (pmt::eqv(direction, ant_direction_rx())) {
+ if (pmt::eqv(direction, direction_rx())) {
new_tune_request = _curr_rx_tune_req[chan];
} else {
new_tune_request = _curr_tx_tune_req[chan];
@@ -902,7 +902,7 @@ usrp_block_impl::get_cmd_or_default_direction(const pmt::pmt_t& cmd) const
// if the direction key exists and is either "TX" or "RX", return that
if (pmt::is_symbol(dir) &&
- (pmt::eqv(dir, ant_direction_rx()) || pmt::eqv(dir, ant_direction_tx()))) {
+ (pmt::eqv(dir, direction_rx()) || pmt::eqv(dir, direction_tx()))) {
return dir;
}
// otherwise return the direction key for the block that received the cmd