1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

RTLSDR: impemented RTLSDR AGC control

This commit is contained in:
f4exb
2017-07-23 16:57:13 +02:00
parent 3b095f4253
commit e9aa78a916
9 changed files with 38 additions and 3 deletions
@@ -256,6 +256,18 @@ bool RTLSDRInput::applySettings(const RTLSDRSettings& settings, bool force)
{
bool forwardChange = false;
if ((m_settings.m_agc != settings.m_agc) || force)
{
if (rtlsdr_set_agc_mode(m_dev, settings.m_agc ? 1 : 0) < 0)
{
qCritical("could not set AGC mode %s", settings.m_agc ? "on" : "off");
}
else
{
m_settings.m_agc = settings.m_agc;
}
}
if ((m_settings.m_gain != settings.m_gain) || force)
{
m_settings.m_gain = settings.m_gain;