aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-09-13 16:36:25 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-09-13 17:32:03 +0200
commitca0892d82277aeaafbaa14a0c03e62833fd9ee69 (patch)
tree60c3e2d55c65cc1d919616828482a322f7050984
parent17e6cd039469e88974c061033effe9cc37b78cd4 (diff)
USRPDevice: Fix setRxGain return on error and getRxGain() returning always 0
field rxGain is set to 0 during constructor and never set after that point. Change-Id: I7fae7a315e5ab98a15c27628a88a92226ef89469
-rw-r--r--Transceiver52M/device/usrp1/USRPDevice.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Transceiver52M/device/usrp1/USRPDevice.cpp b/Transceiver52M/device/usrp1/USRPDevice.cpp
index 63debee..ef3f92a 100644
--- a/Transceiver52M/device/usrp1/USRPDevice.cpp
+++ b/Transceiver52M/device/usrp1/USRPDevice.cpp
@@ -305,10 +305,11 @@ double USRPDevice::setRxGain(double dB, size_t chan)
if (!m_dbRx->set_gain(dB))
LOGC(DDEV, ERR) << "Error setting RX gain";
-
+ else
+ rxGain = dB;
writeLock.unlock();
- return dB;
+ return rxGain;
}
bool USRPDevice::setRxAntenna(const std::string &ant, size_t chan)