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:
parent
e94b1f4827
commit
db419b17c7
|
@ -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;
|
||||
|
|
Reference in New Issue