diff options
author | Josh Blum <josh@joshknows.com> | 2010-11-11 19:13:22 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-11-11 19:13:22 -0800 |
commit | b08ac6273fa6dd1e757ecaeb0b316592696099f7 (patch) | |
tree | 09ac154ab9feee90a5ac41c043c45f75448baefe /host/lib/usrp/usrp2 | |
parent | f22303e6e4a2f425d588439cc05f8b04ef79c1d2 (diff) | |
download | uhd-b08ac6273fa6dd1e757ecaeb0b316592696099f7.tar.gz uhd-b08ac6273fa6dd1e757ecaeb0b316592696099f7.tar.bz2 uhd-b08ac6273fa6dd1e757ecaeb0b316592696099f7.zip |
uhd: removed windows warnings, added string formatting in usrp-n
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r-- | host/lib/usrp/usrp2/codec_impl.cpp | 14 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/dboard_impl.cpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/dsp_impl.cpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_iface.cpp | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/host/lib/usrp/usrp2/codec_impl.cpp b/host/lib/usrp/usrp2/codec_impl.cpp index 998d55297..e417bc340 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, 3.5, 3.5)) - ("digital", gain_range_t(0, 6.0, 0.5)) - ("digital-fine", gain_range_t(0, 0.5, 0.05)); + ("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))); /*********************************************************************** @@ -62,16 +62,16 @@ void usrp2_mboard_impl::rx_codec_get(const wax::obj &key_, wax::obj &val){ switch(_iface->get_rev()){ case usrp2_iface::USRP_N200: case usrp2_iface::USRP_N210: - val = std::string(_iface->get_cname() + " adc - ads62p44"); + val = _iface->get_cname() + " adc - ads62p44"; break; case usrp2_iface::USRP2_REV3: case usrp2_iface::USRP2_REV4: - val = std::string(_iface->get_cname() + " adc - ltc2284"); + val = _iface->get_cname() + " adc - ltc2284"; break; case usrp2_iface::USRP_NXXX: - val = std::string(_iface->get_cname() + " adc - ??????"); + val = _iface->get_cname() + " adc - ??????"; break; } return; @@ -153,7 +153,7 @@ void usrp2_mboard_impl::tx_codec_get(const wax::obj &key_, wax::obj &val){ //handle the get request conditioned on the key switch(key.as<codec_prop_t>()){ case CODEC_PROP_NAME: - val = std::string(_iface->get_cname() + " dac - ad9777"); + val = _iface->get_cname() + " dac - ad9777"; return; case CODEC_PROP_OTHERS: diff --git a/host/lib/usrp/usrp2/dboard_impl.cpp b/host/lib/usrp/usrp2/dboard_impl.cpp index f839a4058..4192c4f78 100644 --- a/host/lib/usrp/usrp2/dboard_impl.cpp +++ b/host/lib/usrp/usrp2/dboard_impl.cpp @@ -64,7 +64,7 @@ void usrp2_mboard_impl::rx_dboard_get(const wax::obj &key_, wax::obj &val){ //handle the get request conditioned on the key switch(key.as<dboard_prop_t>()){ case DBOARD_PROP_NAME: - val = std::string(_iface->get_cname() + " dboard (rx unit)"); + val = _iface->get_cname() + " dboard (rx unit)"; return; case DBOARD_PROP_SUBDEV: @@ -121,7 +121,7 @@ void usrp2_mboard_impl::tx_dboard_get(const wax::obj &key_, wax::obj &val){ //handle the get request conditioned on the key switch(key.as<dboard_prop_t>()){ case DBOARD_PROP_NAME: - val = std::string(_iface->get_cname() + " dboard (tx unit)"); + val = _iface->get_cname() + " dboard (tx unit)"; return; case DBOARD_PROP_SUBDEV: diff --git a/host/lib/usrp/usrp2/dsp_impl.cpp b/host/lib/usrp/usrp2/dsp_impl.cpp index 243a8e905..77ed594f5 100644 --- a/host/lib/usrp/usrp2/dsp_impl.cpp +++ b/host/lib/usrp/usrp2/dsp_impl.cpp @@ -61,7 +61,7 @@ void usrp2_mboard_impl::ddc_get(const wax::obj &key_, wax::obj &val){ switch(key.as<dsp_prop_t>()){ case DSP_PROP_NAME: - val = std::string(_iface->get_cname() + " ddc0"); + val = _iface->get_cname() + " ddc0"; return; case DSP_PROP_OTHERS: @@ -144,7 +144,7 @@ void usrp2_mboard_impl::duc_get(const wax::obj &key_, wax::obj &val){ switch(key.as<dsp_prop_t>()){ case DSP_PROP_NAME: - val = std::string(_iface->get_cname() + " duc0"); + val = _iface->get_cname() + " duc0"; return; case DSP_PROP_OTHERS: diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp index 7208a47cf..2b32faffb 100644 --- a/host/lib/usrp/usrp2/usrp2_iface.cpp +++ b/host/lib/usrp/usrp2/usrp2_iface.cpp @@ -274,8 +274,8 @@ public: rev_type get_rev(void){ switch (boost::lexical_cast<boost::uint16_t>(mb_eeprom["rev"])){ - case 0x0003: return USRP2_REV3; - case 0x0004: return USRP2_REV4; + case 0x0300: return USRP2_REV3; + case 0x0400: return USRP2_REV4; case 0x0A00: return USRP_N200; case 0x0A01: return USRP_N210; } |