1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 17:58:43 -05:00

Merge pull request #1383 from srcejon/fix_1377

RemoteTCPInput: Use input frequency offset when calculating centre frequency
This commit is contained in:
Edouard Griffiths 2022-08-08 14:26:28 +02:00 committed by GitHub
commit a2f9a99559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,7 +152,7 @@ int RemoteTCPInput::getSampleRate() const
quint64 RemoteTCPInput::getCenterFrequency() const quint64 RemoteTCPInput::getCenterFrequency() const
{ {
return m_settings.m_centerFrequency; return m_settings.m_centerFrequency + m_settings.m_inputFrequencyOffset;
} }
void RemoteTCPInput::setCenterFrequency(qint64 centerFrequency) void RemoteTCPInput::setCenterFrequency(qint64 centerFrequency)
@ -264,8 +264,10 @@ void RemoteTCPInput::applySettings(const RemoteTCPInputSettings& settings, bool
if ((m_settings.m_rfBW != settings.m_rfBW) || force) { if ((m_settings.m_rfBW != settings.m_rfBW) || force) {
reverseAPIKeys.append("rfBW"); reverseAPIKeys.append("rfBW");
} }
if ((m_settings.m_inputFrequencyOffset != settings.m_inputFrequencyOffset) || force) { if ((m_settings.m_inputFrequencyOffset != settings.m_inputFrequencyOffset) || force)
{
reverseAPIKeys.append("inputFrequencyOffset"); reverseAPIKeys.append("inputFrequencyOffset");
forwardChange = true;
} }
if ((m_settings.m_channelGain != settings.m_channelGain) || force) { if ((m_settings.m_channelGain != settings.m_channelGain) || force) {
reverseAPIKeys.append("channelGain"); reverseAPIKeys.append("channelGain");
@ -304,7 +306,7 @@ void RemoteTCPInput::applySettings(const RemoteTCPInputSettings& settings, bool
if (forwardChange && (settings.m_channelSampleRate != 0)) if (forwardChange && (settings.m_channelSampleRate != 0))
{ {
DSPSignalNotification *notif = new DSPSignalNotification(settings.m_channelSampleRate, settings.m_centerFrequency); DSPSignalNotification *notif = new DSPSignalNotification(settings.m_channelSampleRate, settings.m_centerFrequency + settings.m_inputFrequencyOffset);
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif); m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
} }