From ca0892d82277aeaafbaa14a0c03e62833fd9ee69 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 13 Sep 2019 16:36:25 +0200 Subject: 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 --- Transceiver52M/device/usrp1/USRPDevice.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Transceiver52M') 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) -- cgit v1.2.3