From 307e6c5eab88385ba8ad3ab683b99e9e4e62070e Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 30 Apr 2020 14:42:59 -0700 Subject: 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. --- host/lib/usrp/dboard/db_basic_and_lf.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'host') 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("name").set(db_name); + this->get_rx_subtree()->create("id").set( + (get_rx_id().to_uint16() & 0xFF) == BASIC_RX_PID ? "basicrx" : "lfrx"); this->get_rx_subtree()->create("gains"); // phony property so this dir exists this->get_rx_subtree()->create("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("name").set(db_name); + this->get_tx_subtree()->create("id").set( + (get_tx_id().to_uint16() & 0xFF) == BASIC_TX_PID ? "basicrx" : "lfrx"); this->get_tx_subtree()->create("gains"); // phony property so this dir exists this->get_tx_subtree()->create("freq/value").set_publisher([]() { return 0.0; -- cgit v1.2.3