aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-14 17:42:39 -0700
committerJosh Blum <josh@joshknows.com>2010-04-14 17:42:39 -0700
commitb9e7e38a84046fc345bcac12611205fbea0bef19 (patch)
tree08d3a26c05f8f2e05fa957bb6d4ed09e7488e9a5 /host/lib
parentf57f616cfd6406cd67681813d464695c8c160f9e (diff)
downloaduhd-b9e7e38a84046fc345bcac12611205fbea0bef19.tar.gz
uhd-b9e7e38a84046fc345bcac12611205fbea0bef19.tar.bz2
uhd-b9e7e38a84046fc345bcac12611205fbea0bef19.zip
removed some windows warnings
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/ic_reg_maps/gen_ad9777_regs.py6
-rw-r--r--host/lib/usrp/dboard/db_rfx.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/host/lib/ic_reg_maps/gen_ad9777_regs.py b/host/lib/ic_reg_maps/gen_ad9777_regs.py
index 135d5c724..6077b61b6 100644
--- a/host/lib/ic_reg_maps/gen_ad9777_regs.py
+++ b/host/lib/ic_reg_maps/gen_ad9777_regs.py
@@ -129,13 +129,13 @@ struct ad9777_regs_t{
#end for
}
- boost::uint32_t get_reg(boost::uint8_t addr){
- boost::uint32_t reg = 0;
+ boost::uint8_t get_reg(boost::uint8_t addr){
+ boost::uint8_t reg = 0;
switch(addr){
#for $addr in sorted(set(map(lambda r: r.get_addr(), $regs)))
case $addr:
#for $reg in filter(lambda r: r.get_addr() == addr, $regs)
- reg |= (boost::uint32_t($reg.get_name()) & $reg.get_mask()) << $reg.get_shift();
+ reg |= (boost::uint8_t($reg.get_name()) & $reg.get_mask()) << $reg.get_shift();
#end for
break;
#end for
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp
index 3f318d3ed..11a689b20 100644
--- a/host/lib/usrp/dboard/db_rfx.cpp
+++ b/host/lib/usrp/dboard/db_rfx.cpp
@@ -175,10 +175,10 @@ void rfx_xcvr::set_rx_ant(const std::string &ant){
void rfx_xcvr::set_rx_pga0_gain(float gain){
//clip the input
- gain = std::clip(gain, 0, _max_rx_pga0_gain);
+ gain = std::clip<float>(gain, 0, _max_rx_pga0_gain);
//voltage level constants
- static const float max_volts = .2, min_volts = 1.2;
+ static const float max_volts = float(.2), min_volts = float(1.2);
static const float slope = (max_volts-min_volts)/_max_rx_pga0_gain;
//calculate the voltage for the aux dac