aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/tune_helper.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-06 11:46:19 -0700
committerJosh Blum <josh@joshknows.com>2010-04-06 11:46:19 -0700
commit9a0087da6c58e93fac6050c4541b1683a02b2d5b (patch)
tree495decb3c7a5dd0f1c6dac2b116c1f12859907be /host/lib/usrp/tune_helper.cpp
parent275b29e07f97cdf638ecb22c602d26b7d340547a (diff)
parent8ee3d7200169983e7a20409ed5e8c37907fe66e1 (diff)
downloaduhd-9a0087da6c58e93fac6050c4541b1683a02b2d5b.tar.gz
uhd-9a0087da6c58e93fac6050c4541b1683a02b2d5b.tar.bz2
uhd-9a0087da6c58e93fac6050c4541b1683a02b2d5b.zip
Merge branch 'master' of git@ettus.sourcerepo.com:ettus/uhd into rfx
Diffstat (limited to 'host/lib/usrp/tune_helper.cpp')
-rw-r--r--host/lib/usrp/tune_helper.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/host/lib/usrp/tune_helper.cpp b/host/lib/usrp/tune_helper.cpp
index 79a6aff7b..2fb15064c 100644
--- a/host/lib/usrp/tune_helper.cpp
+++ b/host/lib/usrp/tune_helper.cpp
@@ -18,6 +18,7 @@
#include <uhd/usrp/tune_helper.hpp>
#include <uhd/utils/algorithm.hpp>
#include <uhd/usrp/subdev_props.hpp>
+#include <uhd/usrp/dsp_props.hpp>
#include <cmath>
using namespace uhd;
@@ -34,8 +35,8 @@ static tune_result_t tune_xx_subdev_and_dxc(
wax::obj subdev_freq_proxy = subdev[SUBDEV_PROP_FREQ];
bool subdev_quadrature = subdev[SUBDEV_PROP_QUADRATURE].as<bool>();
bool subdev_spectrum_inverted = subdev[SUBDEV_PROP_SPECTRUM_INVERTED].as<bool>();
- wax::obj dxc_freq_proxy = dxc[std::string("freq")];
- double dxc_sample_rate = dxc[std::string("if_rate")].as<double>();
+ wax::obj dxc_freq_proxy = dxc[DSP_PROP_FREQ_SHIFT];
+ double dxc_sample_rate = dxc[DSP_PROP_CODEC_RATE].as<double>();
// Ask the d'board to tune as closely as it can to target_freq+lo_offset
double target_inter_freq = target_freq + lo_offset;
@@ -96,8 +97,8 @@ tune_result_t uhd::usrp::tune_rx_subdev_and_ddc(
){
double lo_offset = 0.0;
//if the local oscillator will be in the passband, use an offset
- if (subdev[SUBDEV_PROP_LO_INTERFERES].as<bool>()){
- lo_offset = 2.0*ddc[std::string("bb_rate")].as<double>();
+ if (subdev[SUBDEV_PROP_USE_LO_OFFSET].as<bool>()){
+ lo_offset = 2.0*ddc[DSP_PROP_HOST_RATE].as<double>();
}
return tune_rx_subdev_and_ddc(subdev, ddc, target_freq, lo_offset);
}
@@ -119,8 +120,8 @@ tune_result_t uhd::usrp::tune_tx_subdev_and_duc(
){
double lo_offset = 0.0;
//if the local oscillator will be in the passband, use an offset
- if (subdev[SUBDEV_PROP_LO_INTERFERES].as<bool>()){
- lo_offset = 2.0*duc[std::string("bb_rate")].as<double>();
+ if (subdev[SUBDEV_PROP_USE_LO_OFFSET].as<bool>()){
+ lo_offset = 2.0*duc[DSP_PROP_HOST_RATE].as<double>();
}
return tune_tx_subdev_and_duc(subdev, duc, target_freq, lo_offset);
}