From 63cd7705a9bf04e33f33fb26f25ef23a23a1e9a6 Mon Sep 17 00:00:00 2001 From: Alexander Chemeris Date: Tue, 28 Apr 2015 13:26:07 -0400 Subject: uhd: Update UmTRX specific code to work with PA Tx gain. --- Transceiver52M/UHDDevice.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index 67a50e1..68d5217 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -428,6 +428,8 @@ void uhd_device::init_gains() std::vector gain_stages = usrp_dev->get_tx_gain_names(0); if (gain_stages[0] == "VGA") { LOG(WARNING) << "Update your UHD version for a proper Tx gain support"; + } + if (gain_stages[0] == "VGA" || gain_stages[0] == "PA") { range = usrp_dev->get_tx_gain_range(); tx_gain_min = range.start(); tx_gain_max = range.stop(); @@ -533,8 +535,7 @@ double uhd_device::setTxGain(double db, size_t chan) if (dev_type == UMTRX) { std::vector gain_stages = usrp_dev->get_tx_gain_names(0); - if (gain_stages[0] == "VGA") { - LOG(WARNING) << "Update your UHD version for a proper Tx gain support"; + if (gain_stages[0] == "VGA" || gain_stages[0] == "PA") { usrp_dev->set_tx_gain(db, chan); tx_gains[chan] = usrp_dev->get_tx_gain(chan); } else { -- cgit v1.2.3