diff options
author | Jason Abele <jason@ettus.com> | 2012-02-13 14:27:59 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-03-11 15:54:27 -0700 |
commit | b2c0d1f55a1c2190a6a6fd5967eb0a6ffd60b272 (patch) | |
tree | 1678cf56bdff769a906daddc0a44afa44087a8f2 /host/lib/usrp/dboard/db_dbsrx2.cpp | |
parent | 715fd038325fa4a265328fac2bdb54850b990ea7 (diff) | |
download | uhd-b2c0d1f55a1c2190a6a6fd5967eb0a6ffd60b272.tar.gz uhd-b2c0d1f55a1c2190a6a6fd5967eb0a6ffd60b272.tar.bz2 uhd-b2c0d1f55a1c2190a6a6fd5967eb0a6ffd60b272.zip |
Make DBSRX* set default bandwidth based on codec rate
Diffstat (limited to 'host/lib/usrp/dboard/db_dbsrx2.cpp')
-rw-r--r-- | host/lib/usrp/dboard/db_dbsrx2.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp index 01eec133f..517b7b183 100644 --- a/host/lib/usrp/dboard/db_dbsrx2.cpp +++ b/host/lib/usrp/dboard/db_dbsrx2.cpp @@ -214,9 +214,13 @@ dbsrx2::dbsrx2(ctor_args_t args) : rx_dboard_base(args){ .set(true); //always enabled this->get_rx_subtree()->create<bool>("use_lo_offset") .set(false); + + double codec_rate = this->get_iface()->get_codec_rate(dboard_iface::UNIT_RX); + this->get_rx_subtree()->create<double>("bandwidth/value") .coerce(boost::bind(&dbsrx2::set_bandwidth, this, _1)) - .set(2.0*40.0e6); //bandwidth in lowpass, convert to complex bandpass + .set(2.0*(0.8*codec_rate/2.0)); //bandwidth in lowpass, convert to complex bandpass + //default to anti-alias at different codec_rate this->get_rx_subtree()->create<meta_range_t>("bandwidth/range") .set(dbsrx2_bandwidth_range); |