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
This commit is contained in:
Pau Espin 2019-09-13 16:36:25 +02:00
parent 17e6cd0394
commit ca0892d822
1 changed files with 3 additions and 2 deletions

View File

@ -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)