diff options
author | michael-west <michael.west@ettus.com> | 2018-03-30 16:04:02 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-03-30 16:29:39 -0700 |
commit | b4abe9b90e5619f272468bb34a8b08c36bba19da (patch) | |
tree | 314f3c12e8f227831ab61e4c7f5e717f6cfea159 /host/lib/usrp | |
parent | 4f706e9631f958ef53f2d4ffd0c61342db746332 (diff) | |
download | uhd-b4abe9b90e5619f272468bb34a8b08c36bba19da.tar.gz uhd-b4abe9b90e5619f272468bb34a8b08c36bba19da.tar.bz2 uhd-b4abe9b90e5619f272468bb34a8b08c36bba19da.zip |
UBX: Change antenna functions to coercers on antenna/value properties
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/dboard/db_ubx.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp index 7b153d170..0e85cf188 100644 --- a/host/lib/usrp/dboard/db_ubx.cpp +++ b/host/lib/usrp/dboard/db_ubx.cpp @@ -474,7 +474,7 @@ public: get_tx_subtree()->create<std::vector<std::string> >("antenna/options") .set(ubx_tx_antennas); get_tx_subtree()->create<std::string>("antenna/value") - .add_coerced_subscriber(boost::bind(&ubx_xcvr::set_tx_ant, this, _1)) + .set_coercer(boost::bind(&ubx_xcvr::set_tx_ant, this, _1)) .set(ubx_tx_antennas.at(0)); get_tx_subtree()->create<std::string>("connection") .set("QI"); @@ -511,7 +511,7 @@ public: get_rx_subtree()->create<std::vector<std::string> >("antenna/options") .set(ubx_rx_antennas); get_rx_subtree()->create<std::string>("antenna/value") - .add_coerced_subscriber(boost::bind(&ubx_xcvr::set_rx_ant, this, _1)).set("RX2"); + .set_coercer(boost::bind(&ubx_xcvr::set_rx_ant, this, _1)).set("RX2"); get_rx_subtree()->create<std::string>("connection") .set("IQ"); get_rx_subtree()->create<bool>("enabled") @@ -735,16 +735,17 @@ private: return sensor_value_t("Unknown", false, "locked", "unlocked"); } - void set_tx_ant(const std::string &ant) + std::string set_tx_ant(const std::string &ant) { //validate input assert_has(ubx_tx_antennas, ant, "ubx tx antenna name"); set_cpld_field(CAL_ENABLE, (ant == "CAL")); write_cpld_reg(); + return ant; } // Set RX antennas - void set_rx_ant(const std::string &ant) + std::string set_rx_ant(const std::string &ant) { boost::mutex::scoped_lock lock(_mutex); //validate input @@ -767,6 +768,8 @@ private: } write_gpio(); write_cpld_reg(); + + return ant; } /*********************************************************************** |