aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Transceiver52M/device/usrp1/USRPDevice.cpp6
-rw-r--r--Transceiver52M/device/usrp1/USRPDevice.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/Transceiver52M/device/usrp1/USRPDevice.cpp b/Transceiver52M/device/usrp1/USRPDevice.cpp
index ef3f92a..03a4f80 100644
--- a/Transceiver52M/device/usrp1/USRPDevice.cpp
+++ b/Transceiver52M/device/usrp1/USRPDevice.cpp
@@ -71,6 +71,7 @@ USRPDevice::USRPDevice(size_t tx_sps, size_t rx_sps, InterfaceType iface,
decimRate = (unsigned int) round(masterClockRate/((GSMRATE) * (double) tx_sps));
actualSampleRate = masterClockRate/decimRate;
rxGain = 0;
+ txGain = 0;
/*
* Undetermined delay b/w ping response timestamp and true
@@ -279,10 +280,11 @@ double USRPDevice::setTxGain(double dB, size_t chan)
if (!m_dbTx->set_gain(dB))
LOGC(DDEV, ERR) << "Error setting TX gain";
-
+ else
+ txGain = dB;
writeLock.unlock();
- return dB;
+ return txGain;
}
diff --git a/Transceiver52M/device/usrp1/USRPDevice.h b/Transceiver52M/device/usrp1/USRPDevice.h
index 4123c7d..734b361 100644
--- a/Transceiver52M/device/usrp1/USRPDevice.h
+++ b/Transceiver52M/device/usrp1/USRPDevice.h
@@ -80,6 +80,7 @@ private:
unsigned long lastPktTimestamp;
double rxGain;
+ double txGain;
#ifdef SWLOOPBACK
short loopbackBuffer[1000000];