diff options
author | Marcus Müller <mueller@kit.edu> | 2018-02-20 18:48:05 +0100 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-02-23 19:06:50 +0100 |
commit | a098720f430fae36fbd28d7e9c1548a1e6c4fdf4 (patch) | |
tree | 36c2dc9fe8357b025df80783e4d69148d4b672ce /gr-uhd/lib/usrp_block_impl.cc | |
parent | ea09ab8324045027c6921a0d8ce68673fa4383c6 (diff) |
uhd: replace comparison with runtime-intern'ed PMTs by lookup with const
Diffstat (limited to 'gr-uhd/lib/usrp_block_impl.cc')
-rw-r--r-- | gr-uhd/lib/usrp_block_impl.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gr-uhd/lib/usrp_block_impl.cc b/gr-uhd/lib/usrp_block_impl.cc index 803cfd71ec..f2c6412232 100644 --- a/gr-uhd/lib/usrp_block_impl.cc +++ b/gr-uhd/lib/usrp_block_impl.cc @@ -41,6 +41,8 @@ const pmt::pmt_t CMD_MBOARD_KEY = pmt::mp("mboard"); const pmt::pmt_t CMD_ANTENNA_KEY = pmt::mp("antenna"); const pmt::pmt_t CMD_DIRECTION_KEY = pmt::mp("direction"); +const pmt::pmt_t ANT_DIRECTION_RX = pmt::mp("RX"); +const pmt::pmt_t ANT_DIRECTION_TX = pmt::mp("TX"); /********************************************************************** * Structors @@ -471,7 +473,7 @@ void usrp_block_impl::msg_handler_command(pmt::pmt_t msg) pmt::pmt_t new_msg = pmt::make_dict(); new_msg = pmt::dict_add(new_msg, pmt::tuple_ref(msg, 0), pmt::tuple_ref(msg, 1)); if (pmt::length(msg) == 3) { - new_msg = pmt::dict_add(new_msg, pmt::mp("chan"), pmt::tuple_ref(msg, 2)); + new_msg = pmt::dict_add(new_msg, CMD_CHAN_KEY, pmt::tuple_ref(msg, 2)); } GR_LOG_WARN(d_debug_logger, boost::format("Using legacy message format (tuples): %s") % msg); return msg_handler_command(new_msg); |