1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-08-06 07:42:27 -04:00

USRP: Attempt to support radios without AGC

This commit is contained in:
Jon Beniston 2022-06-20 14:27:23 +01:00
parent 964835e2f2
commit 9b344120e9

View File

@ -822,10 +822,17 @@ bool USRPInput::applySettings(const USRPInputSettings& settings, bool preGetStre
if (m_deviceShared.m_deviceParams->getDevice() && (m_channelAcquired || preGetStream))
{
if (settings.m_gainMode == USRPInputSettings::GAIN_AUTO)
{
try
{
m_deviceShared.m_deviceParams->getDevice()->set_rx_agc(true, m_deviceShared.m_channel);
qDebug() << "USRPInput::applySettings: AGC enabled for channel " << m_deviceShared.m_channel;
}
catch (uhd::not_implemented_error &e)
{
qDebug() << "USRPInput::applySettings: AGC not implemented on this radio. Please set to manual.";
}
}
else
{
m_deviceShared.m_deviceParams->getDevice()->set_rx_agc(false, m_deviceShared.m_channel);