1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-16 13:21:50 -05:00

SDRPlay support: source plugin interim state (4) Corrected gain settings. SDRPlay interface is not compatible with Qt anyway

This commit is contained in:
f4exb 2016-11-14 03:23:41 +01:00
parent c9216f2093
commit fcbb7b79ca

View File

@ -68,7 +68,7 @@ bool SDRPlayInput::start(int device)
return false; return false;
} }
int agcSetPoint = m_settings.m_gainRedctionIndex; int agcSetPoint = -m_settings.m_gainRedctionIndex;
double sampleRateMHz = SDRPlaySampleRates::getRate(m_settings.m_devSampleRateIndex) / 1e3; double sampleRateMHz = SDRPlaySampleRates::getRate(m_settings.m_devSampleRateIndex) / 1e3;
double frequencyMHz = m_settings.m_centerFrequency / 1e6; double frequencyMHz = m_settings.m_centerFrequency / 1e6;
int infoOverallGr; int infoOverallGr;
@ -87,6 +87,8 @@ bool SDRPlayInput::start(int device)
qDebug("SDRPlayInput::start: sampleRateMHz: %lf frequencyMHz: %lf", sampleRateMHz, frequencyMHz); qDebug("SDRPlayInput::start: sampleRateMHz: %lf frequencyMHz: %lf", sampleRateMHz, frequencyMHz);
mir_sdr_DebugEnable(1);
r = mir_sdr_StreamInit( r = mir_sdr_StreamInit(
&agcSetPoint, &agcSetPoint,
sampleRateMHz, sampleRateMHz,
@ -97,8 +99,8 @@ bool SDRPlayInput::start(int device)
&infoOverallGr, &infoOverallGr,
0, /* use internal gr tables according to band */ 0, /* use internal gr tables according to band */
&m_samplesPerPacket, &m_samplesPerPacket,
m_sdrPlayThread->streamCallback, SDRPlayThread::streamCallback,
callbackGC, SDRPlayInput::callbackGC,
0); 0);
if (r != mir_sdr_Success) if (r != mir_sdr_Success)
@ -345,7 +347,7 @@ bool SDRPlayInput::applySettings(const SDRPlaySettings& settings, bool force)
void SDRPlayInput::reinitMirSDR(mir_sdr_ReasonForReinitT reasonForReinit) void SDRPlayInput::reinitMirSDR(mir_sdr_ReasonForReinitT reasonForReinit)
{ {
int grdB = m_settings.m_gainRedctionIndex; int grdB = -m_settings.m_gainRedctionIndex;
int rate = SDRPlaySampleRates::getRate(m_settings.m_devSampleRateIndex); int rate = SDRPlaySampleRates::getRate(m_settings.m_devSampleRateIndex);
int gRdBsystem; int gRdBsystem;