diff options
author | Josh Blum <josh@joshknows.com> | 2010-08-15 23:21:43 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-08-15 23:21:43 -0700 |
commit | 963f60c69c25a1295b5ed4dee07df5d91567deb7 (patch) | |
tree | 0fa0d0e281a8cf17f3b222e1b2226fb45c16fa27 /host/lib/usrp/usrp2 | |
parent | e7d4233a94571a2479b21bc081567214c38cc155 (diff) | |
parent | f75869e4f7ffb53ca7f348c3a1b6d6c8fb1499b7 (diff) | |
download | uhd-963f60c69c25a1295b5ed4dee07df5d91567deb7.tar.gz uhd-963f60c69c25a1295b5ed4dee07df5d91567deb7.tar.bz2 uhd-963f60c69c25a1295b5ed4dee07df5d91567deb7.zip |
Merge branch 'next' into usrp1_next
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r-- | host/lib/usrp/usrp2/dboard_impl.cpp | 12 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/dsp_impl.cpp | 10 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/mboard_impl.cpp | 5 |
3 files changed, 16 insertions, 11 deletions
diff --git a/host/lib/usrp/usrp2/dboard_impl.cpp b/host/lib/usrp/usrp2/dboard_impl.cpp index bafeb3f15..a462b93c2 100644 --- a/host/lib/usrp/usrp2/dboard_impl.cpp +++ b/host/lib/usrp/usrp2/dboard_impl.cpp @@ -17,8 +17,8 @@ #include "usrp2_impl.hpp" #include "usrp2_regs.hpp" -#include "../dsp_utils.hpp" -#include "../misc_utils.hpp" +#include <uhd/usrp/misc_utils.hpp> +#include <uhd/usrp/dsp_utils.hpp> #include <uhd/usrp/subdev_props.hpp> #include <uhd/usrp/dboard_props.hpp> #include <uhd/utils/assert.hpp> @@ -89,7 +89,9 @@ void usrp2_mboard_impl::rx_dboard_get(const wax::obj &key_, wax::obj &val){ case DBOARD_PROP_GAIN_GROUP: val = make_gain_group( - _dboard_manager->get_rx_subdev(key.name), _rx_codec_proxy->get_link() + _dboard_manager->get_rx_subdev(key.name), + _rx_codec_proxy->get_link(), + GAIN_GROUP_POLICY_RX ); return; @@ -143,7 +145,9 @@ void usrp2_mboard_impl::tx_dboard_get(const wax::obj &key_, wax::obj &val){ case DBOARD_PROP_GAIN_GROUP: val = make_gain_group( - _dboard_manager->get_tx_subdev(key.name), _tx_codec_proxy->get_link() + _dboard_manager->get_tx_subdev(key.name), + _tx_codec_proxy->get_link(), + GAIN_GROUP_POLICY_TX ); return; diff --git a/host/lib/usrp/usrp2/dsp_impl.cpp b/host/lib/usrp/usrp2/dsp_impl.cpp index 7d9cdc441..347ec38af 100644 --- a/host/lib/usrp/usrp2/dsp_impl.cpp +++ b/host/lib/usrp/usrp2/dsp_impl.cpp @@ -17,9 +17,10 @@ #include "usrp2_impl.hpp" #include "usrp2_regs.hpp" -#include "../dsp_utils.hpp" +#include <uhd/usrp/dsp_utils.hpp> #include <uhd/usrp/dsp_props.hpp> #include <boost/bind.hpp> +#include <cmath> using namespace uhd; using namespace uhd::usrp; @@ -30,10 +31,9 @@ static const size_t default_interp = 16; /*********************************************************************** * DDC Helper Methods **********************************************************************/ -template <class rate_t> static rate_t -pick_closest_rate(double exact_rate, const std::vector<rate_t> &rates){ - rate_t closest_match = rates.at(0); - BOOST_FOREACH(rate_t possible_rate, rates){ +static unsigned pick_closest_rate(double exact_rate, const std::vector<unsigned> &rates){ + unsigned closest_match = rates.front(); + BOOST_FOREACH(unsigned possible_rate, rates){ if(std::abs(exact_rate - possible_rate) < std::abs(exact_rate - closest_match)) closest_match = possible_rate; } diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp index d354a943b..d5785f326 100644 --- a/host/lib/usrp/usrp2/mboard_impl.cpp +++ b/host/lib/usrp/usrp2/mboard_impl.cpp @@ -17,14 +17,15 @@ #include "usrp2_impl.hpp" #include "usrp2_regs.hpp" -#include "../misc_utils.hpp" -#include "../dsp_utils.hpp" +#include <uhd/usrp/misc_utils.hpp> +#include <uhd/usrp/dsp_utils.hpp> #include <uhd/usrp/mboard_props.hpp> #include <uhd/utils/assert.hpp> #include <uhd/utils/algorithm.hpp> #include <uhd/types/mac_addr.hpp> #include <uhd/types/dict.hpp> #include <boost/bind.hpp> +#include <boost/assign/list_of.hpp> #include <boost/asio/ip/address_v4.hpp> #include <iostream> |