diff options
author | Trung N Tran <trung.tran@ettus.com> | 2018-02-05 11:26:18 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-02-08 22:24:21 +0100 |
commit | 20a776bce3eec84c093b23e79d01b715f8756d72 (patch) | |
tree | fde15a5b4c4499a13da27b817dedec09dac90ccf /host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp | |
parent | d76918974ad467a4364d4c32948ce00a3afb59ff (diff) | |
download | uhd-20a776bce3eec84c093b23e79d01b715f8756d72.tar.gz uhd-20a776bce3eec84c093b23e79d01b715f8756d72.tar.bz2 uhd-20a776bce3eec84c093b23e79d01b715f8756d72.zip |
mg : implement set_bandwidth
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp')
-rw-r--r-- | host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp index 85e4a5e30..6f1e42946 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp @@ -26,7 +26,7 @@ namespace { }; constexpr double MAGNESIUM_DEFAULT_FREQ = 2.5e9; // Hz - constexpr double MAGNESIUM_DEFAULT_BANDWIDTH = 40e6; // Hz + constexpr double MAGNESIUM_DEFAULT_BANDWIDTH = 100e6; // Hz constexpr char MAGNESIUM_DEFAULT_RX_ANTENNA[] = "RX2"; constexpr char MAGNESIUM_DEFAULT_TX_ANTENNA[] = "TX/RX"; @@ -286,16 +286,13 @@ void magnesium_radio_ctrl_impl::_init_frontend_subtree( ; // TX bandwidth subtree->create<double>(tx_fe_path / "bandwidth" / "value") + .set(AD9371_TX_MAX_BANDWIDTH) .set_coercer([this, chan_idx](const double bw){ return this->set_tx_bandwidth(bw, chan_idx); }) - .set_publisher([this, chan_idx](){ - //return this->get_tx_bandwidth(chan_idx); - return 0.0; // FIXME - }) ; subtree->create<meta_range_t>(tx_fe_path / "bandwidth" / "range") - .set(meta_range_t(0.0, 0.0, 0.0)) // FIXME + .set(meta_range_t(AD9371_TX_MIN_BANDWIDTH, AD9371_TX_MAX_BANDWIDTH)) .add_coerced_subscriber([](const meta_range_t &){ throw uhd::runtime_error( "Attempting to update bandwidth range!"); @@ -303,15 +300,13 @@ void magnesium_radio_ctrl_impl::_init_frontend_subtree( ; // RX bandwidth subtree->create<double>(rx_fe_path / "bandwidth" / "value") + .set(AD9371_RX_MAX_BANDWIDTH) .set_coercer([this, chan_idx](const double bw){ return this->set_rx_bandwidth(bw, chan_idx); }) - .set_publisher([this, chan_idx](){ - return this->get_rx_bandwidth(chan_idx); - }) ; subtree->create<meta_range_t>(rx_fe_path / "bandwidth" / "range") - .set(meta_range_t(0.0, 0.0, 0.0)) // FIXME + .set(meta_range_t(AD9371_RX_MIN_BANDWIDTH, AD9371_RX_MAX_BANDWIDTH)) .add_coerced_subscriber([](const meta_range_t &){ throw uhd::runtime_error( "Attempting to update bandwidth range!"); |