aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Transceiver52M/radioInterface.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Transceiver52M/radioInterface.cpp b/Transceiver52M/radioInterface.cpp
index 1afa01b..531a0dd 100644
--- a/Transceiver52M/radioInterface.cpp
+++ b/Transceiver52M/radioInterface.cpp
@@ -103,10 +103,10 @@ double RadioInterface::fullScaleOutputValue(void) {
void RadioInterface::setPowerAttenuation(double atten)
{
- double rfAtten, digAtten;
+ double rfGain, digAtten;
- rfAtten = mRadio->setTxGain(mRadio->maxTxGain() - atten);
- digAtten = atten - rfAtten;
+ rfGain = mRadio->setTxGain(mRadio->maxTxGain() - atten);
+ digAtten = atten - mRadio->maxTxGain() + rfGain;
if (digAtten < 1.0)
powerScaling = 1.0;