laforge
/
openbts-osmo
Archived
1
0
Fork 0

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 <ttsou@vt.edu>
This commit is contained in:
Thomas Tsou 2011-05-23 12:08:09 -07:00
parent e94b1f4827
commit db419b17c7
1 changed files with 1 additions and 1 deletions

View File

@ -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;