From f8bf633965156d937b37a893ae243788413c0c26 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 12 Jun 2012 13:36:15 -0700 Subject: 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. --- host/utils/usrp_cal_utils.hpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'host/utils/usrp_cal_utils.hpp') 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(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(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"); } -- cgit v1.2.3