1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-18 22:31:48 -05:00

Airspy input: fixed transverter feature

This commit is contained in:
f4exb 2017-09-25 23:16:29 +02:00
parent 84d5b4f1ee
commit efdfc797ff

View File

@ -343,6 +343,7 @@ bool AirspyInput::applySettings(const AirspySettings& settings, bool force)
m_settings.m_centerFrequency = settings.m_centerFrequency; m_settings.m_centerFrequency = settings.m_centerFrequency;
m_settings.m_transverterMode = settings.m_transverterMode; m_settings.m_transverterMode = settings.m_transverterMode;
m_settings.m_transverterDeltaFrequency = settings.m_transverterDeltaFrequency; m_settings.m_transverterDeltaFrequency = settings.m_transverterDeltaFrequency;
m_settings.m_LOppmTenths = settings.m_LOppmTenths;
qint64 deviceCenterFrequency = m_settings.m_centerFrequency; qint64 deviceCenterFrequency = m_settings.m_centerFrequency;
deviceCenterFrequency -= m_settings.m_transverterMode ? m_settings.m_transverterDeltaFrequency : 0; deviceCenterFrequency -= m_settings.m_transverterMode ? m_settings.m_transverterDeltaFrequency : 0;
@ -350,23 +351,20 @@ bool AirspyInput::applySettings(const AirspySettings& settings, bool force)
qint64 f_img = deviceCenterFrequency; qint64 f_img = deviceCenterFrequency;
quint32 devSampleRate = m_sampleRates[m_settings.m_devSampleRateIndex]; quint32 devSampleRate = m_sampleRates[m_settings.m_devSampleRateIndex];
m_settings.m_LOppmTenths = settings.m_LOppmTenths;
if ((m_settings.m_log2Decim == 0) || (settings.m_fcPos == AirspySettings::FC_POS_CENTER)) if ((m_settings.m_log2Decim == 0) || (settings.m_fcPos == AirspySettings::FC_POS_CENTER))
{ {
deviceCenterFrequency = m_settings.m_centerFrequency;
f_img = deviceCenterFrequency; f_img = deviceCenterFrequency;
} }
else else
{ {
if (settings.m_fcPos == AirspySettings::FC_POS_INFRA) if (settings.m_fcPos == AirspySettings::FC_POS_INFRA)
{ {
deviceCenterFrequency = m_settings.m_centerFrequency + (devSampleRate / 4); deviceCenterFrequency += (devSampleRate / 4);
f_img = deviceCenterFrequency + devSampleRate/2; f_img = deviceCenterFrequency + devSampleRate/2;
} }
else if (settings.m_fcPos == AirspySettings::FC_POS_SUPRA) else if (settings.m_fcPos == AirspySettings::FC_POS_SUPRA)
{ {
deviceCenterFrequency = m_settings.m_centerFrequency - (devSampleRate / 4); deviceCenterFrequency -= (devSampleRate / 4);
f_img = deviceCenterFrequency - devSampleRate/2; f_img = deviceCenterFrequency - devSampleRate/2;
} }
} }