diff options
author | Josh Blum <josh@joshknows.com> | 2010-09-23 18:46:58 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-09-23 18:46:58 -0700 |
commit | 42576f1ed98735a69a20cc788d09acd82cb69ae8 (patch) | |
tree | 3d5d6ce1d479fa0b9e785f17f64e719b20718575 /host/lib/usrp/usrp1/dsp_impl.cpp | |
parent | af1882ab65bb1395f75dd7a7fbdcfc8535c32479 (diff) | |
download | uhd-42576f1ed98735a69a20cc788d09acd82cb69ae8.tar.gz uhd-42576f1ed98735a69a20cc788d09acd82cb69ae8.tar.bz2 uhd-42576f1ed98735a69a20cc788d09acd82cb69ae8.zip |
usrp1: removed msvc warnings for usrp1 impl code
Diffstat (limited to 'host/lib/usrp/usrp1/dsp_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp1/dsp_impl.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/host/lib/usrp/usrp1/dsp_impl.cpp b/host/lib/usrp/usrp1/dsp_impl.cpp index 573bce21f..e9a5e60a6 100644 --- a/host/lib/usrp/usrp1/dsp_impl.cpp +++ b/host/lib/usrp/usrp1/dsp_impl.cpp @@ -107,8 +107,7 @@ void usrp1_impl::rx_dsp_set(const wax::obj &key_, const wax::obj &val){ return; } case DSP_PROP_HOST_RATE: { - unsigned int rate = - _clock_ctrl->get_master_clock_freq() / val.as<double>(); + size_t rate = size_t(_clock_ctrl->get_master_clock_freq() / val.as<double>()); if ((rate & 0x01) || (rate < 4) || (rate > 256)) { std::cerr << "Decimation must be even and between 4 and 256" @@ -118,7 +117,7 @@ void usrp1_impl::rx_dsp_set(const wax::obj &key_, const wax::obj &val){ _rx_dsp_decim = rate; //TODO Poll every 100ms. Make it selectable? - _rx_samps_per_poll_interval = 0.1 * _clock_ctrl->get_master_clock_freq() / rate; + _rx_samps_per_poll_interval = size_t(0.1 * _clock_ctrl->get_master_clock_freq() / rate); _iface->poke32(FR_DECIM_RATE, _rx_dsp_decim/2 - 1); } @@ -207,8 +206,7 @@ void usrp1_impl::tx_dsp_set(const wax::obj &key_, const wax::obj &val){ } case DSP_PROP_HOST_RATE: { - unsigned int rate = - _clock_ctrl->get_master_clock_freq() * 2 / val.as<double>(); + size_t rate = size_t(_clock_ctrl->get_master_clock_freq() * 2 / val.as<double>()); if ((rate & 0x01) || (rate < 8) || (rate > 512)) { std::cerr << "Interpolation rate must be even and between 8 and 512" @@ -219,7 +217,7 @@ void usrp1_impl::tx_dsp_set(const wax::obj &key_, const wax::obj &val){ _tx_dsp_interp = rate; //TODO Poll every 100ms. Make it selectable? - _tx_samps_per_poll_interval = 0.1 * _clock_ctrl->get_master_clock_freq() * 2 / rate; + _tx_samps_per_poll_interval = size_t(0.1 * _clock_ctrl->get_master_clock_freq() * 2 / rate); _iface->poke32(FR_INTERP_RATE, _tx_dsp_interp / 4 - 1); return; |