From db419b17c7e644f0e9f87a5e915a515febaa0b6a Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Mon, 23 May 2011 12:08:09 -0700 Subject: [PATCH] uhd: set attenuation relative to max RF gain Previously this was referenced off the the ad9862 PGA with a range from 0 to -20 dB. Instead base the attenuation factor on the maximum total RF gain returned by the device. Signed-off-by: Thomas Tsou --- public-trunk/Transceiver52M/radioInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-trunk/Transceiver52M/radioInterface.cpp b/public-trunk/Transceiver52M/radioInterface.cpp index 95dee22..c4f8d23 100644 --- a/public-trunk/Transceiver52M/radioInterface.cpp +++ b/public-trunk/Transceiver52M/radioInterface.cpp @@ -109,7 +109,7 @@ double RadioInterface::fullScaleOutputValue(void) { void RadioInterface::setPowerAttenuation(double atten) { - double HWatten = mRadio->setTxGain(-atten); + double HWatten = mRadio->setTxGain(mRadio->maxTxGain() - atten); atten -= (-HWatten); if (atten < 1.0) powerScaling = 1.0;