aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-06-12 13:36:15 -0700
committerJosh Blum <josh@joshknows.com>2012-06-12 13:36:15 -0700
commitf8bf633965156d937b37a893ae243788413c0c26 (patch)
treeefcbd0fc675ff75f326bae12fa1be7a55f549eec /host/utils
parenta80b715583de5f282bd3857348d982f2709ef770 (diff)
downloaduhd-f8bf633965156d937b37a893ae243788413c0c26.tar.gz
uhd-f8bf633965156d937b37a893ae243788413c0c26.tar.bz2
uhd-f8bf633965156d937b37a893ae243788413c0c26.zip
RFX: added support for calibration utils
Special CAL RX antenna rule: keep mixer enabled to reduce transients. 0 dB gains settings for RX and TX to deal with RFX sensitivity range.
Diffstat (limited to 'host/utils')
-rw-r--r--host/utils/usrp_cal_utils.hpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/host/utils/usrp_cal_utils.hpp b/host/utils/usrp_cal_utils.hpp
index 825d94d64..43eca4d46 100644
--- a/host/utils/usrp_cal_utils.hpp
+++ b/host/utils/usrp_cal_utils.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2011-2012 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -68,7 +68,13 @@ static inline void set_optimum_defaults(uhd::usrp::multi_usrp::sptr usrp){
const uhd::fs_path tx_fe_path = "/mboards/0/dboards/A/tx_frontends/0";
const std::string tx_name = tree->access<std::string>(tx_fe_path / "name").get();
- if (tx_name.find("WBX") != std::string::npos or tx_name.find("SBX") != std::string::npos){
+ if (tx_name.find("WBX") != std::string::npos){
+ usrp->set_tx_gain(0);
+ }
+ if (tx_name.find("SBX") != std::string::npos){
+ usrp->set_tx_gain(0);
+ }
+ if (tx_name.find("RFX") != std::string::npos){
usrp->set_tx_gain(0);
}
else{
@@ -77,9 +83,15 @@ static inline void set_optimum_defaults(uhd::usrp::multi_usrp::sptr usrp){
const uhd::fs_path rx_fe_path = "/mboards/0/dboards/A/tx_frontends/0";
const std::string rx_name = tree->access<std::string>(rx_fe_path / "name").get();
- if (rx_name.find("WBX") != std::string::npos or rx_name.find("SBX") != std::string::npos){
+ if (rx_name.find("WBX") != std::string::npos){
usrp->set_rx_gain(25);
}
+ if (rx_name.find("SBX") != std::string::npos){
+ usrp->set_rx_gain(25);
+ }
+ if (rx_name.find("RFX") != std::string::npos){
+ usrp->set_rx_gain(0);
+ }
else{
throw std::runtime_error("self-calibration is not supported for this hardware");
}