1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

RemoteTCPInput: Use input frequency offset when calculating local centre frequency

This commit is contained in:
Jon Beniston 2022-08-08 11:27:00 +01:00
parent a9054f1add
commit 1af00bf357

View File

@ -152,7 +152,7 @@ int RemoteTCPInput::getSampleRate() const
quint64 RemoteTCPInput::getCenterFrequency() const
{
return m_settings.m_centerFrequency;
return m_settings.m_centerFrequency + m_settings.m_inputFrequencyOffset;
}
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) {
reverseAPIKeys.append("rfBW");
}
if ((m_settings.m_inputFrequencyOffset != settings.m_inputFrequencyOffset) || force) {
if ((m_settings.m_inputFrequencyOffset != settings.m_inputFrequencyOffset) || force)
{
reverseAPIKeys.append("inputFrequencyOffset");
forwardChange = true;
}
if ((m_settings.m_channelGain != settings.m_channelGain) || force) {
reverseAPIKeys.append("channelGain");
@ -304,7 +306,7 @@ void RemoteTCPInput::applySettings(const RemoteTCPInputSettings& settings, bool
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);
}