diff options
author | Jacob Gilbert <jacob.gilbert@protonmail.com> | 2021-03-29 20:48:45 -0600 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-04-05 07:28:48 -0400 |
commit | deb4c4dd97cb668b399496d8edab2cfa8d69f85b (patch) | |
tree | 9aea07f580eaee0891649a8c55d08a7e5f7b84d7 /gr-uhd/lib/usrp_block_impl.h | |
parent | d2680c18d36148cd87582ec4adc6f38b27e249db (diff) |
gr-uhd: fix command tuning
Command tuning has seen several updates recently and incomplete
regression testing. One issue introduced is that when tuning without
a direction key will result in the tune applied in the TX direction
instead of the block direction (intended). This fixes that by adding
member getters for block direction and putting the logic to get the
command direction in a common function.
Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
Diffstat (limited to 'gr-uhd/lib/usrp_block_impl.h')
-rw-r--r-- | gr-uhd/lib/usrp_block_impl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gr-uhd/lib/usrp_block_impl.h b/gr-uhd/lib/usrp_block_impl.h index 664ef4c417..b9bf6d3acf 100644 --- a/gr-uhd/lib/usrp_block_impl.h +++ b/gr-uhd/lib/usrp_block_impl.h @@ -227,6 +227,12 @@ protected: //! Stores the individual command handlers ::uhd::dict<pmt::pmt_t, cmd_handler_t> _msg_cmd_handlers; + + //! Will check a command for a direction key, if it does not exist this will use + // the default value for the block via _direction() defined below + const pmt::pmt_t get_cmd_or_default_direction(const pmt::pmt_t& cmd) const; + //! Block direction overloaded by block impl to return "RX"/"TX" for source/sink + virtual const pmt::pmt_t _direction() const = 0; }; } /* namespace uhd */ |