diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-06-07 18:34:29 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:59 -0800 |
commit | 3d9076403bd5cb48dcfda48b1eb262f8cb7a42bf (patch) | |
tree | 6670b61c1ba6f8700e7db2f372ed4f3ddf7c6b5d | |
parent | 2768ad75d5b48afea61f2803579cc432d598eb61 (diff) | |
download | uhd-3d9076403bd5cb48dcfda48b1eb262f8cb7a42bf.tar.gz uhd-3d9076403bd5cb48dcfda48b1eb262f8cb7a42bf.tar.bz2 uhd-3d9076403bd5cb48dcfda48b1eb262f8cb7a42bf.zip |
eiscat: Enable proper prop tree coercer and publisher
-rw-r--r-- | host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp index 5e7ab9199..4d2975114 100644 --- a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp +++ b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp @@ -39,7 +39,7 @@ namespace { const double EISCAT_RADIO_RATE = 104e6; // Hz const double EISCAT_CENTER_FREQ = 208e6; // Hz const double EISCAT_DEFAULT_NULL_GAIN = 0.0; // dB. This is not the digital antenna gain, this a fake stub value. - const double EISCAT_DEFAULT_BANDWIDTH = 52e6; // Hz + const double EISCAT_DEFAULT_BANDWIDTH = 104e6; // Hz const char* EISCAT_DEFAULT_ANTENNA = "BF"; const size_t EISCAT_NUM_ANTENNAS = 16; const size_t EISCAT_NUM_BEAMS = 10; @@ -204,25 +204,34 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(eiscat_radio_ctrl) .set("I") ; _tree->create<double>(fe_path / fe_idx / "freq" / "value") - .set(EISCAT_CENTER_FREQ) - .set_coercer(boost::bind(&eiscat_radio_ctrl_impl::set_rx_frequency, this, _1, 0)) - .set_publisher(boost::bind(&radio_ctrl_impl::get_rx_frequency, this, 0)) + .set_coercer([this](const double freq){ + return this->set_rx_frequency(freq, 0); + }) + .set_publisher([this](){ + return this->get_rx_frequency(0); + }) ; _tree->create<meta_range_t>(fe_path / fe_idx / "freq" / "range") .set(meta_range_t(EISCAT_CENTER_FREQ, EISCAT_CENTER_FREQ)) ; _tree->create<double>(fe_path / fe_idx / "gains" / "null" / "value") - .set(EISCAT_DEFAULT_NULL_GAIN) - //.set_coercer(boost::bind(&eiscat_radio_ctrl_impl::set_rx_gain, this, _1, 0)) - //.set_publisher(boost::bind(&radio_ctrl_impl::get_rx_gain, this, 0)) + .set_coercer([this](const double gain){ + return this->set_rx_gain(gain, 0); + }) + .set_publisher([this](){ + return this->get_rx_gain(0); + }) ; _tree->create<meta_range_t>(fe_path / fe_idx / "gains" / "null" / "range") .set(meta_range_t(EISCAT_DEFAULT_NULL_GAIN, EISCAT_DEFAULT_NULL_GAIN)) ; _tree->create<double>(fe_path / fe_idx / "bandwidth" / "value") - .set(EISCAT_DEFAULT_BANDWIDTH) - //.set_coercer(boost::bind(&eiscat_radio_ctrl_impl::set_rx_bandwidth, this, _1, 0)) - //.set_publisher(boost::bind(&radio_ctrl_impl::get_rx_bandwidth, this, 0)) + .set_coercer([this](const double bw){ + return this->set_rx_bandwidth(bw, 0); + }) + .set_publisher([this](){ + return this->get_rx_bandwidth(0); + }) ; _tree->create<meta_range_t>(fe_path / fe_idx / "bandwidth" / "range") .set(meta_range_t(EISCAT_DEFAULT_BANDWIDTH, EISCAT_DEFAULT_BANDWIDTH)) |