diff options
author | Josh Blum <josh@joshknows.com> | 2011-01-11 19:46:45 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-01-11 19:46:45 -0800 |
commit | 395bbbbc1118b061262a10d5c847f17a4fd0c6ae (patch) | |
tree | 6347a18702529cfd42dcb94c37ce2866b49b93f4 /host/lib/usrp/usrp2/codec_impl.cpp | |
parent | 18defbd9d40a4c11a33025c8684f48fe51f102c5 (diff) | |
download | uhd-395bbbbc1118b061262a10d5c847f17a4fd0c6ae.tar.gz uhd-395bbbbc1118b061262a10d5c847f17a4fd0c6ae.tar.bz2 uhd-395bbbbc1118b061262a10d5c847f17a4fd0c6ae.zip |
uhd: replace all the instances of float not pertaining to io types with double, simplifies life
Diffstat (limited to 'host/lib/usrp/usrp2/codec_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/codec_impl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/host/lib/usrp/usrp2/codec_impl.cpp b/host/lib/usrp/usrp2/codec_impl.cpp index e417bc340..c52f0f46f 100644 --- a/host/lib/usrp/usrp2/codec_impl.cpp +++ b/host/lib/usrp/usrp2/codec_impl.cpp @@ -30,9 +30,9 @@ using namespace boost::assign; //this only applies to USRP2P static const uhd::dict<std::string, gain_range_t> codec_rx_gain_ranges = map_list_of - ("analog", gain_range_t(0, float(3.5), float(3.5))) - ("digital", gain_range_t(0, float(6.0), float(0.5))) - ("digital-fine", gain_range_t(0, float(0.5), float(0.05))); + ("analog", gain_range_t(0, 3.5, 3.5)) + ("digital", gain_range_t(0, 6.0, 0.5)) + ("digital-fine", gain_range_t(0, 0.5, 0.05)); /*********************************************************************** @@ -112,7 +112,7 @@ void usrp2_mboard_impl::rx_codec_set(const wax::obj &key_, const wax::obj &val){ switch(key.as<codec_prop_t>()) { case CODEC_PROP_GAIN_I: case CODEC_PROP_GAIN_Q: - this->rx_codec_set_gain(val.as<float>(), key.name); + this->rx_codec_set_gain(val.as<double>(), key.name); return; default: UHD_THROW_PROP_SET_ERROR(); @@ -123,7 +123,7 @@ void usrp2_mboard_impl::rx_codec_set(const wax::obj &key_, const wax::obj &val){ * Helper function to set RX codec gain ***********************************************************************/ -void usrp2_mboard_impl::rx_codec_set_gain(float gain, const std::string &name){ +void usrp2_mboard_impl::rx_codec_set_gain(double gain, const std::string &name){ assert_has(codec_rx_gain_ranges.keys(), name, "codec rx gain name"); _codec_rx_gains[name] = gain; |