1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-27 02:09:14 -05:00

LimeSDR input: fixed DSP message not sent to self when sending to buddies

This commit is contained in:
f4exb 2017-04-18 02:10:37 +02:00
parent d7acf6f1f9
commit 1a22772744
2 changed files with 13 additions and 2 deletions

View File

@ -454,6 +454,11 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
std::vector<DeviceSourceAPI*>::const_iterator itSource = sourceBuddies.begin(); std::vector<DeviceSourceAPI*>::const_iterator itSource = sourceBuddies.begin();
int sampleRate = m_settings.m_devSampleRate/(1<<(m_settings.m_log2HardDecim + m_settings.m_log2SoftDecim)); int sampleRate = m_settings.m_devSampleRate/(1<<(m_settings.m_log2HardDecim + m_settings.m_log2SoftDecim));
// send to self first
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency);
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
// send to source buddies
for (; itSource != sourceBuddies.end(); ++itSource) for (; itSource != sourceBuddies.end(); ++itSource)
{ {
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency); DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency);
@ -465,6 +470,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
(*itSource)->getDeviceInputMessageQueue()->push(report); (*itSource)->getDeviceInputMessageQueue()->push(report);
} }
// send to sink buddies
const std::vector<DeviceSinkAPI*>& sinkBuddies = m_deviceAPI->getSinkBuddies(); const std::vector<DeviceSinkAPI*>& sinkBuddies = m_deviceAPI->getSinkBuddies();
std::vector<DeviceSinkAPI*>::const_iterator itSink = sinkBuddies.begin(); std::vector<DeviceSinkAPI*>::const_iterator itSink = sinkBuddies.begin();
@ -485,6 +491,11 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
std::vector<DeviceSourceAPI*>::const_iterator it = sourceBuddies.begin(); std::vector<DeviceSourceAPI*>::const_iterator it = sourceBuddies.begin();
int sampleRate = m_settings.m_devSampleRate/(1<<(m_settings.m_log2HardDecim + m_settings.m_log2SoftDecim)); int sampleRate = m_settings.m_devSampleRate/(1<<(m_settings.m_log2HardDecim + m_settings.m_log2SoftDecim));
// send to self first
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency);
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
// send to source buddies
for (; it != sourceBuddies.end(); ++it) for (; it != sourceBuddies.end(); ++it)
{ {
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency); DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency);
@ -505,7 +516,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
qDebug() << "LimeSDRInput::applySettings: center freq: " << m_settings.m_centerFrequency << " Hz" qDebug() << "LimeSDRInput::applySettings: center freq: " << m_settings.m_centerFrequency << " Hz"
<< " device sample rate: " << m_settings.m_devSampleRate << "S/s" << " device sample rate: " << m_settings.m_devSampleRate << "S/s"
<< " sample rate after soft decimation: " << m_settings.m_devSampleRate/(1<<m_settings.m_log2SoftDecim) << "S/s"; << " sample rate after decimation: " << m_settings.m_devSampleRate/(1<<(m_settings.m_log2HardDecim + m_settings.m_log2SoftDecim)) << "S/s";
return true; return true;
} }

View File

@ -25,7 +25,7 @@ LimeSDRInputSettings::LimeSDRInputSettings()
void LimeSDRInputSettings::resetToDefaults() void LimeSDRInputSettings::resetToDefaults()
{ {
m_centerFrequency = 435000*1000; m_centerFrequency = 435000*1000;
m_devSampleRate = 3072000; m_devSampleRate = 6000000;
m_log2HardDecim = 2; m_log2HardDecim = 2;
m_dcBlock = false; m_dcBlock = false;
m_iqCorrection = false; m_iqCorrection = false;