diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-04-30 14:42:59 -0700 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-05-19 13:30:36 -0500 |
commit | 307e6c5eab88385ba8ad3ab683b99e9e4e62070e (patch) | |
tree | 0c9c8020bee3f19d223d03f9d41f880a6865ac4b /host | |
parent | 14ed832af5bb3aebf4b8da9e1e96ad0e8d194c6e (diff) | |
download | uhd-307e6c5eab88385ba8ad3ab683b99e9e4e62070e.tar.gz uhd-307e6c5eab88385ba8ad3ab683b99e9e4e62070e.tar.bz2 uhd-307e6c5eab88385ba8ad3ab683b99e9e4e62070e.zip |
basic/lf: Add IDs for calibration purpose
This adds a property tree node "id" next to the "name" node. It is
always either basicrx/lfrx/basixtx/lftx based on the daughterboard. The
x300_radio_control uses this to help distinguish daughterboards for
calibration's sake, where length strings, potentially with special
characters, are too unwieldy.
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/usrp/dboard/db_basic_and_lf.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp index aaeaff2a6..3282d53c3 100644 --- a/host/lib/usrp/dboard/db_basic_and_lf.cpp +++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp @@ -122,6 +122,8 @@ basic_rx::basic_rx(ctor_args_t args, double max_freq) // Register properties //////////////////////////////////////////////////////////////////// this->get_rx_subtree()->create<std::string>("name").set(db_name); + this->get_rx_subtree()->create<std::string>("id").set( + (get_rx_id().to_uint16() & 0xFF) == BASIC_RX_PID ? "basicrx" : "lfrx"); this->get_rx_subtree()->create<int>("gains"); // phony property so this dir exists this->get_rx_subtree()->create<double>("freq/value").set_publisher([]() { return 0.0; @@ -217,6 +219,8 @@ basic_tx::basic_tx(ctor_args_t args, double max_freq) : tx_dboard_base(args) // Register properties //////////////////////////////////////////////////////////////////// this->get_tx_subtree()->create<std::string>("name").set(db_name); + this->get_tx_subtree()->create<std::string>("id").set( + (get_tx_id().to_uint16() & 0xFF) == BASIC_TX_PID ? "basicrx" : "lfrx"); this->get_tx_subtree()->create<int>("gains"); // phony property so this dir exists this->get_tx_subtree()->create<double>("freq/value").set_publisher([]() { return 0.0; |