summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-15 14:57:30 -0700
committerJosh Blum <josh@joshknows.com>2010-07-16 16:51:30 -0700
commit2a3d0e653e9d38dc3eed729d1442f3d98aadb1e5 (patch)
treea3614c0c9b8d6765846715d8902dbc03174a4e7d /host
parent1b7bf0ce1a5b5306323730ef790b3038d4ca3979 (diff)
downloaduhd-2a3d0e653e9d38dc3eed729d1442f3d98aadb1e5.tar.gz
uhd-2a3d0e653e9d38dc3eed729d1442f3d98aadb1e5.tar.bz2
uhd-2a3d0e653e9d38dc3eed729d1442f3d98aadb1e5.zip
usrp: removed spectrum inverted property from subdev code and tune helper (it wasnt used)
Diffstat (limited to 'host')
-rw-r--r--host/include/uhd/usrp/subdev_props.hpp1
-rw-r--r--host/lib/usrp/dboard/db_basic_and_lf.cpp8
-rw-r--r--host/lib/usrp/dboard/db_rfx.cpp8
-rw-r--r--host/lib/usrp/dboard/db_unknown.cpp8
-rw-r--r--host/lib/usrp/dboard/db_wbx.cpp8
-rw-r--r--host/lib/usrp/dboard/db_xcvr2450.cpp8
-rw-r--r--host/lib/usrp/tune_helper.cpp13
-rw-r--r--host/test/tune_helper_test.cpp13
-rw-r--r--host/utils/uhd_usrp_probe.cpp1
9 files changed, 7 insertions, 61 deletions
diff --git a/host/include/uhd/usrp/subdev_props.hpp b/host/include/uhd/usrp/subdev_props.hpp
index 1f8e91d68..cb7027ff1 100644
--- a/host/include/uhd/usrp/subdev_props.hpp
+++ b/host/include/uhd/usrp/subdev_props.hpp
@@ -38,7 +38,6 @@ namespace uhd{ namespace usrp{
SUBDEV_PROP_LO_LOCKED = 'L', //ro, bool
SUBDEV_PROP_QUADRATURE = 'q', //ro, bool
SUBDEV_PROP_IQ_SWAPPED = 'i', //ro, bool
- SUBDEV_PROP_SPECTRUM_INVERTED = 's', //ro, bool
SUBDEV_PROP_USE_LO_OFFSET = 'l', //ro, bool
SUBDEV_PROP_RSSI = 'R', //ro, float
SUBDEV_PROP_BANDWIDTH = 'B' //rw, double
diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp
index 766deac78..b40be9dea 100644
--- a/host/lib/usrp/dboard/db_basic_and_lf.cpp
+++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp
@@ -146,10 +146,6 @@ void basic_rx::rx_get(const wax::obj &key_, wax::obj &val){
val = false;
return;
- case SUBDEV_PROP_SPECTRUM_INVERTED:
- val = false;
- return;
-
case SUBDEV_PROP_USE_LO_OFFSET:
val = false;
return;
@@ -245,10 +241,6 @@ void basic_tx::tx_get(const wax::obj &key_, wax::obj &val){
val = false;
return;
- case SUBDEV_PROP_SPECTRUM_INVERTED:
- val = false;
- return;
-
case SUBDEV_PROP_USE_LO_OFFSET:
val = false;
return;
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp
index 2d6088983..9e5fcd6c6 100644
--- a/host/lib/usrp/dboard/db_rfx.cpp
+++ b/host/lib/usrp/dboard/db_rfx.cpp
@@ -434,10 +434,6 @@ void rfx_xcvr::rx_get(const wax::obj &key_, wax::obj &val){
val = true;
return;
- case SUBDEV_PROP_SPECTRUM_INVERTED:
- val = false;
- return;
-
case SUBDEV_PROP_USE_LO_OFFSET:
val = false;
return;
@@ -524,10 +520,6 @@ void rfx_xcvr::tx_get(const wax::obj &key_, wax::obj &val){
val = false;
return;
- case SUBDEV_PROP_SPECTRUM_INVERTED:
- val = false;
- return;
-
case SUBDEV_PROP_USE_LO_OFFSET:
val = true;
return;
diff --git a/host/lib/usrp/dboard/db_unknown.cpp b/host/lib/usrp/dboard/db_unknown.cpp
index ced27e34d..8b247c289 100644
--- a/host/lib/usrp/dboard/db_unknown.cpp
+++ b/host/lib/usrp/dboard/db_unknown.cpp
@@ -127,10 +127,6 @@ void unknown_rx::rx_get(const wax::obj &key_, wax::obj &val){
val = false;
return;
- case SUBDEV_PROP_SPECTRUM_INVERTED:
- val = false;
- return;
-
case SUBDEV_PROP_USE_LO_OFFSET:
val = false;
return;
@@ -226,10 +222,6 @@ void unknown_tx::tx_get(const wax::obj &key_, wax::obj &val){
val = false;
return;
- case SUBDEV_PROP_SPECTRUM_INVERTED:
- val = false;
- return;
-
case SUBDEV_PROP_USE_LO_OFFSET:
val = false;
return;
diff --git a/host/lib/usrp/dboard/db_wbx.cpp b/host/lib/usrp/dboard/db_wbx.cpp
index 28bd6317b..23eb5ca44 100644
--- a/host/lib/usrp/dboard/db_wbx.cpp
+++ b/host/lib/usrp/dboard/db_wbx.cpp
@@ -518,10 +518,6 @@ void wbx_xcvr::rx_get(const wax::obj &key_, wax::obj &val){
val = false;
return;
- case SUBDEV_PROP_SPECTRUM_INVERTED:
- val = false;
- return;
-
case SUBDEV_PROP_USE_LO_OFFSET:
val = false;
return;
@@ -612,10 +608,6 @@ void wbx_xcvr::tx_get(const wax::obj &key_, wax::obj &val){
val = false;
return;
- case SUBDEV_PROP_SPECTRUM_INVERTED:
- val = false;
- return;
-
case SUBDEV_PROP_USE_LO_OFFSET:
val = false;
return;
diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp
index 5032b6f31..fabf3dffd 100644
--- a/host/lib/usrp/dboard/db_xcvr2450.cpp
+++ b/host/lib/usrp/dboard/db_xcvr2450.cpp
@@ -489,10 +489,6 @@ void xcvr2450::rx_get(const wax::obj &key_, wax::obj &val){
val = false;
return;
- case SUBDEV_PROP_SPECTRUM_INVERTED:
- val = false;
- return;
-
case SUBDEV_PROP_USE_LO_OFFSET:
val = false;
return;
@@ -587,10 +583,6 @@ void xcvr2450::tx_get(const wax::obj &key_, wax::obj &val){
val = true;
return;
- case SUBDEV_PROP_SPECTRUM_INVERTED:
- val = false;
- return;
-
case SUBDEV_PROP_USE_LO_OFFSET:
val = false;
return;
diff --git a/host/lib/usrp/tune_helper.cpp b/host/lib/usrp/tune_helper.cpp
index 1d584913c..dd2985d88 100644
--- a/host/lib/usrp/tune_helper.cpp
+++ b/host/lib/usrp/tune_helper.cpp
@@ -30,13 +30,12 @@ using namespace uhd::usrp;
**********************************************************************/
static bool invert_dxc_freq(
bool outside_of_nyquist,
- bool subdev_spectrum_inverted,
bool subdev_quadrature,
dboard_iface::unit_t unit
){
bool is_tx = unit == dboard_iface::UNIT_TX;
if (subdev_quadrature) return is_tx;
- return outside_of_nyquist xor subdev_spectrum_inverted xor is_tx;
+ return outside_of_nyquist xor is_tx;
}
static tune_result_t tune_xx_subdev_and_dxc(
@@ -46,7 +45,6 @@ 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[DSP_PROP_FREQ_SHIFT];
double dxc_sample_rate = dxc[DSP_PROP_CODEC_RATE].as<double>();
@@ -63,9 +61,7 @@ static tune_result_t tune_xx_subdev_and_dxc(
//invert the sign on the dxc freq given the following conditions
bool outside_of_nyquist = std::abs(target_freq - actual_inter_freq) > dxc_sample_rate/2.0;
- if (invert_dxc_freq(
- outside_of_nyquist, subdev_spectrum_inverted, subdev_quadrature, unit
- )) target_dxc_freq *= -1.0;
+ if (invert_dxc_freq(outside_of_nyquist, subdev_quadrature, unit)) target_dxc_freq *= -1.0;
dxc_freq_proxy = target_dxc_freq;
double actual_dxc_freq = dxc_freq_proxy.as<double>();
@@ -85,16 +81,13 @@ static double derive_freq_from_xx_subdev_and_dxc(
){
//extract subdev properties
bool subdev_quadrature = subdev[SUBDEV_PROP_QUADRATURE].as<bool>();
- bool subdev_spectrum_inverted = subdev[SUBDEV_PROP_SPECTRUM_INVERTED].as<bool>();
//extract actual dsp and IF frequencies
double actual_inter_freq = subdev[SUBDEV_PROP_FREQ].as<double>();
double actual_dxc_freq = dxc[DSP_PROP_FREQ_SHIFT].as<double>();
//invert the sign on the dxc freq given the following conditions
- if (invert_dxc_freq(
- false, subdev_spectrum_inverted, subdev_quadrature, unit
- )) actual_dxc_freq *= -1.0;
+ if (invert_dxc_freq(false, subdev_quadrature, unit)) actual_dxc_freq *= -1.0;
return actual_inter_freq - actual_dxc_freq;
}
diff --git a/host/test/tune_helper_test.cpp b/host/test/tune_helper_test.cpp
index 47b47beda..a6e6f4cc9 100644
--- a/host/test/tune_helper_test.cpp
+++ b/host/test/tune_helper_test.cpp
@@ -29,9 +29,8 @@ using namespace uhd::usrp;
**********************************************************************/
class dummy_subdev : public wax::obj{
public:
- dummy_subdev(bool is_quadrature, bool is_spectrum_inverted, double resolution):
+ dummy_subdev(bool is_quadrature, double resolution):
_is_quadrature(is_quadrature),
- _is_spectrum_inverted(is_spectrum_inverted),
_resolution(resolution)
{
/* NOP */
@@ -43,10 +42,6 @@ private:
val = _is_quadrature;
return;
- case SUBDEV_PROP_SPECTRUM_INVERTED:
- val = _is_spectrum_inverted;
- return;
-
case SUBDEV_PROP_FREQ:
val = _freq;
return;
@@ -69,7 +64,7 @@ private:
}
}
- bool _is_quadrature, _is_spectrum_inverted;
+ bool _is_quadrature;
double _freq, _resolution;
};
@@ -114,7 +109,7 @@ private:
static const double tolerance = 0.001;
BOOST_AUTO_TEST_CASE(test_tune_helper_rx){
- dummy_subdev subdev(true, false, 1e6);
+ dummy_subdev subdev(true, 1e6);
dummy_dsp dsp(100e6);
std::cout << "Testing tune helper RX automatic LO offset" << std::endl;
@@ -128,7 +123,7 @@ BOOST_AUTO_TEST_CASE(test_tune_helper_rx){
}
BOOST_AUTO_TEST_CASE(test_tune_helper_tx){
- dummy_subdev subdev(true, false, 1e6);
+ dummy_subdev subdev(true, 1e6);
dummy_dsp dsp(100e6);
std::cout << "Testing tune helper TX automatic LO offset" << std::endl;
diff --git a/host/utils/uhd_usrp_probe.cpp b/host/utils/uhd_usrp_probe.cpp
index 1e8e726d2..611c6919d 100644
--- a/host/utils/uhd_usrp_probe.cpp
+++ b/host/utils/uhd_usrp_probe.cpp
@@ -90,7 +90,6 @@ static std::string get_subdev_pp_string(const std::string &type, wax::obj subdev
ss << boost::format("Is Quadrature: %s") % (subdev[usrp::SUBDEV_PROP_QUADRATURE].as<bool>()? "Yes" : "No") << std::endl;
ss << boost::format("Is IQ Swapped: %s") % (subdev[usrp::SUBDEV_PROP_IQ_SWAPPED].as<bool>()? "Yes" : "No") << std::endl;
- ss << boost::format("Is Spectrum Inverted: %s") % (subdev[usrp::SUBDEV_PROP_SPECTRUM_INVERTED].as<bool>()? "Yes" : "No") << std::endl;
ss << boost::format("Uses LO offset: %s") % (subdev[usrp::SUBDEV_PROP_USE_LO_OFFSET].as<bool>()? "Yes" : "No") << std::endl;
return ss.str();