mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-10 10:33:29 -05:00
LimeSDR: removed obsolete message. Only stop current side threads if changing center frequency
This commit is contained in:
parent
238c8d312e
commit
2572f2be84
@ -17,7 +17,6 @@
|
||||
#include "devicelimesdrshared.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgReportSampleRateDirChange, Message)
|
||||
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgCrossReportToBuddy, Message)
|
||||
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgReportDeviceInfo, Message)
|
||||
|
||||
const float DeviceLimeSDRShared::m_sampleFifoLengthInSeconds = 0.25;
|
||||
|
@ -27,26 +27,6 @@
|
||||
class DeviceLimeSDRShared
|
||||
{
|
||||
public:
|
||||
class MsgCrossReportToBuddy : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
int getSampleRate() const { return m_sampleRate; }
|
||||
|
||||
static MsgCrossReportToBuddy* create(int sampleRate)
|
||||
{
|
||||
return new MsgCrossReportToBuddy(sampleRate);
|
||||
}
|
||||
|
||||
private:
|
||||
int m_sampleRate;
|
||||
|
||||
MsgCrossReportToBuddy(int sampleRate) :
|
||||
Message(),
|
||||
m_sampleRate(sampleRate)
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportSampleRateDirChange : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
|
@ -31,7 +31,6 @@
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgConfigureLimeSDR, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgGetStreamInfo, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgGetDeviceInfo, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgReportLimeSDRToBuddy, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgReportStreamInfo, Message)
|
||||
|
||||
|
||||
@ -442,20 +441,6 @@ bool LimeSDROutput::handleMessage(const Message& message)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MsgReportLimeSDRToBuddy::match(message))
|
||||
{
|
||||
MsgReportLimeSDRToBuddy& conf = (MsgReportLimeSDRToBuddy&) message;
|
||||
m_settings.m_centerFrequency = conf.getCenterFrequency();
|
||||
m_settings.m_devSampleRate = conf.getSampleRate();
|
||||
m_settings.m_log2HardInterp = conf.getLog2HardInterp();
|
||||
|
||||
qDebug() << "LimeSDRInput::handleMessage: MsgReportLimeSDRToBuddy:"
|
||||
<< " m_centerFrequency: " << conf.getCenterFrequency()
|
||||
<< " m_devSampleRate: " << conf.getSampleRate()
|
||||
<< " m_log2HardDecim: " << conf.getLog2HardInterp();
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgReportSampleRateDirChange::match(message))
|
||||
{
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange& report = (DeviceLimeSDRShared::MsgReportSampleRateDirChange&) message;
|
||||
@ -489,16 +474,6 @@ bool LimeSDROutput::handleMessage(const Message& message)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
||||
{
|
||||
DeviceLimeSDRShared::MsgCrossReportToBuddy& conf = (DeviceLimeSDRShared::MsgCrossReportToBuddy&) message;
|
||||
m_settings.m_devSampleRate = conf.getSampleRate();
|
||||
|
||||
qDebug() << "LimeSDRInput::handleMessage: MsgCrossReportToBuddy:"
|
||||
<< " m_devSampleRate: " << conf.getSampleRate();
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MsgGetStreamInfo::match(message))
|
||||
{
|
||||
// qDebug() << "LimeSDROutput::handleMessage: MsgGetStreamInfo";
|
||||
@ -606,23 +581,20 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
||||
bool suspendTxThread = false;
|
||||
bool suspendAllThread = false;
|
||||
bool doCalibration = false;
|
||||
// bool forceNCOFrequency = false;
|
||||
// QMutexLocker mutexLocker(&m_mutex);
|
||||
|
||||
// determine if buddies threads or own thread need to be suspended
|
||||
|
||||
if ((m_settings.m_devSampleRate != settings.m_devSampleRate) ||
|
||||
(m_settings.m_log2HardInterp != settings.m_log2HardInterp) ||
|
||||
(m_settings.m_centerFrequency != settings.m_centerFrequency) ||force)
|
||||
(m_settings.m_log2HardInterp != settings.m_log2HardInterp) ||force)
|
||||
{
|
||||
suspendAllThread = true;
|
||||
}
|
||||
|
||||
// if ((m_settings.m_log2HardInterp != settings.m_log2HardInterp) ||
|
||||
// (m_settings.m_centerFrequency != settings.m_centerFrequency) || force)
|
||||
// {
|
||||
// suspendTxThread = true;
|
||||
// }
|
||||
if ((m_settings.m_centerFrequency != settings.m_centerFrequency) || force)
|
||||
{
|
||||
suspendTxThread = true;
|
||||
}
|
||||
|
||||
if ((m_settings.m_gain != settings.m_gain) ||
|
||||
(m_settings.m_lpfBW != settings.m_lpfBW) ||
|
||||
@ -691,7 +663,6 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
||||
if ((m_settings.m_devSampleRate != settings.m_devSampleRate)
|
||||
|| (m_settings.m_log2HardInterp != settings.m_log2HardInterp) || force)
|
||||
{
|
||||
// forwardChangeTxDSP = m_settings.m_log2HardInterp != settings.m_log2HardInterp;
|
||||
forwardChangeAllDSP = true; //m_settings.m_devSampleRate != settings.m_devSampleRate;
|
||||
|
||||
if (m_deviceShared.m_deviceParams->getDevice() != 0)
|
||||
@ -920,27 +891,6 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange *report = DeviceLimeSDRShared::MsgReportSampleRateDirChange::create(
|
||||
m_settings.m_devSampleRate, m_settings.m_log2HardInterp, false);
|
||||
(*itSink)->getSampleSinkInputMessageQueue()->push(report);
|
||||
|
||||
// DeviceLimeSDRShared *buddySharedPtr = (DeviceLimeSDRShared *) (*itSink)->getBuddySharedPtr();
|
||||
// int buddyNCOFreq = buddySharedPtr->m_ncoFrequency;
|
||||
// uint32_t buddyLog2SoftInterp = buddySharedPtr->m_log2Soft;
|
||||
// DSPSignalNotification *notif = new DSPSignalNotification(
|
||||
// m_settings.m_devSampleRate/(1<<buddyLog2SoftInterp),
|
||||
// m_settings.m_centerFrequency + buddyNCOFreq); // do not change center frequency
|
||||
// (*itSink)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
//
|
||||
// MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
||||
// m_settings.m_centerFrequency,
|
||||
// m_settings.m_devSampleRate,
|
||||
// m_settings.m_log2HardInterp);
|
||||
//
|
||||
// if ((*itSink)->getSampleSinkGUIMessageQueue())
|
||||
// {
|
||||
// MsgReportLimeSDRToBuddy *reportToGUI = new MsgReportLimeSDRToBuddy(*report);
|
||||
// (*itSink)->getSampleSinkGUIMessageQueue()->push(reportToGUI);
|
||||
// }
|
||||
//
|
||||
// (*itSink)->getSampleSinkInputMessageQueue()->push(report);
|
||||
}
|
||||
|
||||
// send to source buddies
|
||||
@ -952,25 +902,6 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange *report = DeviceLimeSDRShared::MsgReportSampleRateDirChange::create(
|
||||
m_settings.m_devSampleRate, m_settings.m_log2HardInterp, false);
|
||||
(*itSource)->getSampleSourceInputMessageQueue()->push(report);
|
||||
|
||||
// DeviceLimeSDRShared *buddySharedPtr = (DeviceLimeSDRShared *) (*itSource)->getBuddySharedPtr();
|
||||
// uint64_t buddyCenterFreq = buddySharedPtr->m_centerFrequency;
|
||||
// int buddyNCOFreq = buddySharedPtr->m_ncoFrequency;
|
||||
// uint32_t buddyLog2SoftDecim = buddySharedPtr->m_log2Soft;
|
||||
// DSPSignalNotification *notif = new DSPSignalNotification(
|
||||
// m_settings.m_devSampleRate/(1<<buddyLog2SoftDecim),
|
||||
// buddyCenterFreq + buddyNCOFreq);
|
||||
// (*itSource)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
//
|
||||
// DeviceLimeSDRShared::MsgCrossReportToBuddy *report = DeviceLimeSDRShared::MsgCrossReportToBuddy::create(m_settings.m_devSampleRate);
|
||||
//
|
||||
// if ((*itSource)->getSampleSourceGUIMessageQueue())
|
||||
// {
|
||||
// DeviceLimeSDRShared::MsgCrossReportToBuddy *reportToGUI = new DeviceLimeSDRShared::MsgCrossReportToBuddy(*report);
|
||||
// (*itSource)->getSampleSourceGUIMessageQueue()->push(reportToGUI);
|
||||
// }
|
||||
//
|
||||
// (*itSource)->getSampleSourceInputMessageQueue()->push(report);
|
||||
}
|
||||
}
|
||||
else if (forwardChangeTxDSP)
|
||||
@ -990,23 +921,8 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
||||
|
||||
for (; itSink != sinkBuddies.end(); ++itSink)
|
||||
{
|
||||
DeviceLimeSDRShared *buddySharedPtr = (DeviceLimeSDRShared *) (*itSink)->getBuddySharedPtr();
|
||||
uint64_t buddyCenterFreq = buddySharedPtr->m_centerFrequency;
|
||||
int buddyNCOFreq = buddySharedPtr->m_ncoFrequency;
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, buddyCenterFreq + buddyNCOFreq); // do not change center frequency
|
||||
(*itSink)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
|
||||
MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
||||
m_settings.m_centerFrequency,
|
||||
m_settings.m_devSampleRate,
|
||||
m_settings.m_log2HardInterp);
|
||||
|
||||
if ((*itSink)->getSampleSinkGUIMessageQueue())
|
||||
{
|
||||
MsgReportLimeSDRToBuddy *reportToGUI = new MsgReportLimeSDRToBuddy(*report);
|
||||
(*itSink)->getSampleSinkGUIMessageQueue()->push(reportToGUI);
|
||||
}
|
||||
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange *report = DeviceLimeSDRShared::MsgReportSampleRateDirChange::create(
|
||||
m_settings.m_devSampleRate, m_settings.m_log2HardInterp, false);
|
||||
(*itSink)->getSampleSinkInputMessageQueue()->push(report);
|
||||
}
|
||||
}
|
||||
|
@ -84,32 +84,6 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportLimeSDRToBuddy : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
float getCenterFrequency() const { return m_centerFrequency; }
|
||||
int getSampleRate() const { return m_sampleRate; }
|
||||
uint32_t getLog2HardInterp() const { return m_log2HardInterp; }
|
||||
|
||||
static MsgReportLimeSDRToBuddy* create(float centerFrequency, int sampleRate, uint32_t log2HardInterp)
|
||||
{
|
||||
return new MsgReportLimeSDRToBuddy(centerFrequency, sampleRate, log2HardInterp);
|
||||
}
|
||||
|
||||
private:
|
||||
float m_centerFrequency;
|
||||
int m_sampleRate;
|
||||
uint32_t m_log2HardInterp;
|
||||
|
||||
MsgReportLimeSDRToBuddy(float centerFrequency, int sampleRate, uint32_t log2HardInterp) :
|
||||
Message(),
|
||||
m_centerFrequency(centerFrequency),
|
||||
m_sampleRate(sampleRate),
|
||||
m_log2HardInterp(log2HardInterp)
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportStreamInfo : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
|
@ -141,22 +141,7 @@ bool LimeSDROutputGUI::deserialize(const QByteArray& data)
|
||||
|
||||
bool LimeSDROutputGUI::handleMessage(const Message& message)
|
||||
{
|
||||
if (LimeSDROutput::MsgReportLimeSDRToBuddy::match(message))
|
||||
{
|
||||
qDebug("LimeSDROutputGUI::handleMessagesToGUI: message: %s", message.getIdentifier());
|
||||
LimeSDROutput::MsgReportLimeSDRToBuddy& report = (LimeSDROutput::MsgReportLimeSDRToBuddy&) message;
|
||||
|
||||
m_settings.m_centerFrequency = report.getCenterFrequency();
|
||||
m_settings.m_devSampleRate = report.getSampleRate();
|
||||
m_settings.m_log2HardInterp = report.getLog2HardInterp();
|
||||
|
||||
blockApplySettings(true);
|
||||
displaySettings();
|
||||
blockApplySettings(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgReportSampleRateDirChange::match(message))
|
||||
if (DeviceLimeSDRShared::MsgReportSampleRateDirChange::match(message))
|
||||
{
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange& report = (DeviceLimeSDRShared::MsgReportSampleRateDirChange&) message;
|
||||
m_settings.m_devSampleRate = report.getDevSampleRate();
|
||||
@ -168,18 +153,6 @@ bool LimeSDROutputGUI::handleMessage(const Message& message)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
||||
{
|
||||
qDebug("LimeSDROutputGUI::handleMessagesToGUI: message: %s", message.getIdentifier());
|
||||
DeviceLimeSDRShared::MsgCrossReportToBuddy& report = (DeviceLimeSDRShared::MsgCrossReportToBuddy&) message;
|
||||
m_settings.m_devSampleRate = report.getSampleRate();
|
||||
|
||||
blockApplySettings(true);
|
||||
displaySettings();
|
||||
blockApplySettings(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (LimeSDROutput::MsgReportStreamInfo::match(message))
|
||||
{
|
||||
LimeSDROutput::MsgReportStreamInfo& report = (LimeSDROutput::MsgReportStreamInfo&) message;
|
||||
|
@ -33,7 +33,6 @@
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgConfigureLimeSDR, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgGetStreamInfo, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgGetDeviceInfo, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgReportLimeSDRToBuddy, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgReportStreamInfo, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgFileRecord, Message)
|
||||
|
||||
@ -427,20 +426,6 @@ bool LimeSDRInput::handleMessage(const Message& message)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MsgReportLimeSDRToBuddy::match(message))
|
||||
{
|
||||
MsgReportLimeSDRToBuddy& conf = (MsgReportLimeSDRToBuddy&) message;
|
||||
m_settings.m_centerFrequency = conf.getCenterFrequency();
|
||||
m_settings.m_devSampleRate = conf.getSampleRate();
|
||||
m_settings.m_log2HardDecim = conf.getLog2HardDecim();
|
||||
|
||||
qDebug() << "LimeSDRInput::handleMessage: MsgReportLimeSDRToBuddy:"
|
||||
<< " m_centerFrequency: " << conf.getCenterFrequency()
|
||||
<< " m_devSampleRate: " << conf.getSampleRate()
|
||||
<< " m_log2HardDecim: " << conf.getLog2HardDecim();
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgReportSampleRateDirChange::match(message))
|
||||
{
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange& report = (DeviceLimeSDRShared::MsgReportSampleRateDirChange&) message;
|
||||
@ -474,16 +459,6 @@ bool LimeSDRInput::handleMessage(const Message& message)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
||||
{
|
||||
DeviceLimeSDRShared::MsgCrossReportToBuddy& conf = (DeviceLimeSDRShared::MsgCrossReportToBuddy&) message;
|
||||
m_settings.m_devSampleRate = conf.getSampleRate();
|
||||
|
||||
qDebug() << "LimeSDRInput::handleMessage: MsgCrossReportToBuddy:"
|
||||
<< " m_devSampleRate: " << conf.getSampleRate();
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MsgGetStreamInfo::match(message))
|
||||
{
|
||||
// qDebug() << "LimeSDRInput::handleMessage: MsgGetStreamInfo";
|
||||
@ -605,23 +580,20 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||
bool suspendAllThread = false;
|
||||
bool doCalibration = false;
|
||||
bool setAntennaAuto = false;
|
||||
// bool forceNCOFrequency = false;
|
||||
// QMutexLocker mutexLocker(&m_mutex);
|
||||
|
||||
// determine if buddies threads or own thread need to be suspended
|
||||
|
||||
if ((m_settings.m_devSampleRate != settings.m_devSampleRate) ||
|
||||
(m_settings.m_log2HardDecim != settings.m_log2HardDecim) ||
|
||||
(m_settings.m_centerFrequency != settings.m_centerFrequency) || force)
|
||||
(m_settings.m_log2HardDecim != settings.m_log2HardDecim) || force)
|
||||
{
|
||||
suspendAllThread = true;
|
||||
}
|
||||
|
||||
// if ((m_settings.m_log2HardDecim != settings.m_log2HardDecim) ||
|
||||
// (m_settings.m_centerFrequency != settings.m_centerFrequency) || force)
|
||||
// {
|
||||
// suspendRxThread = true;
|
||||
// }
|
||||
if ((m_settings.m_centerFrequency != settings.m_centerFrequency) || force)
|
||||
{
|
||||
suspendRxThread = true;
|
||||
}
|
||||
|
||||
if ((m_settings.m_antennaPath != settings.m_antennaPath) &&
|
||||
(m_settings.m_antennaPath == 0))
|
||||
@ -835,7 +807,6 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||
if ((m_settings.m_devSampleRate != settings.m_devSampleRate)
|
||||
|| (m_settings.m_log2HardDecim != settings.m_log2HardDecim) || force)
|
||||
{
|
||||
// forwardChangeRxDSP = m_settings.m_log2HardDecim != settings.m_log2HardDecim;
|
||||
forwardChangeAllDSP = true; //m_settings.m_devSampleRate != settings.m_devSampleRate;
|
||||
|
||||
m_settings.m_devSampleRate = settings.m_devSampleRate;
|
||||
@ -1079,27 +1050,6 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange *report = DeviceLimeSDRShared::MsgReportSampleRateDirChange::create(
|
||||
m_settings.m_devSampleRate, m_settings.m_log2HardDecim, true);
|
||||
(*itSource)->getSampleSourceInputMessageQueue()->push(report);
|
||||
|
||||
// DeviceLimeSDRShared *buddySharedPtr = (DeviceLimeSDRShared *) (*itSource)->getBuddySharedPtr();
|
||||
// int buddyNCOFreq = buddySharedPtr->m_ncoFrequency;
|
||||
// uint32_t buddyLog2Decim = buddySharedPtr->m_log2Soft;
|
||||
// DSPSignalNotification *notif = new DSPSignalNotification(
|
||||
// m_settings.m_devSampleRate/(1<<buddyLog2Decim),
|
||||
// m_settings.m_centerFrequency + buddyNCOFreq);
|
||||
// (*itSource)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
//
|
||||
// MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
||||
// m_settings.m_centerFrequency,
|
||||
// m_settings.m_devSampleRate,
|
||||
// m_settings.m_log2HardDecim);
|
||||
//
|
||||
// if ((*itSource)->getSampleSourceGUIMessageQueue())
|
||||
// {
|
||||
// MsgReportLimeSDRToBuddy *reportToGUI = new MsgReportLimeSDRToBuddy(*report);
|
||||
// (*itSource)->getSampleSourceGUIMessageQueue()->push(reportToGUI);
|
||||
// }
|
||||
//
|
||||
// (*itSource)->getSampleSourceInputMessageQueue()->push(report);
|
||||
}
|
||||
|
||||
// send to sink buddies
|
||||
@ -1111,25 +1061,6 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange *report = DeviceLimeSDRShared::MsgReportSampleRateDirChange::create(
|
||||
m_settings.m_devSampleRate, m_settings.m_log2HardDecim, true);
|
||||
(*itSink)->getSampleSinkInputMessageQueue()->push(report);
|
||||
|
||||
// DeviceLimeSDRShared *buddySharedPtr = (DeviceLimeSDRShared *) (*itSink)->getBuddySharedPtr();
|
||||
// uint64_t buddyCenterFreq = buddySharedPtr->m_centerFrequency;
|
||||
// int buddyNCOFreq = buddySharedPtr->m_ncoFrequency;
|
||||
// uint32_t buddyLog2Interp = buddySharedPtr->m_log2Soft;
|
||||
// DSPSignalNotification *notif = new DSPSignalNotification(
|
||||
// m_settings.m_devSampleRate/(1<<buddyLog2Interp),
|
||||
// buddyCenterFreq + buddyNCOFreq); // do not change center frequency
|
||||
// (*itSink)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
//
|
||||
// DeviceLimeSDRShared::MsgCrossReportToBuddy *report = DeviceLimeSDRShared::MsgCrossReportToBuddy::create(m_settings.m_devSampleRate);
|
||||
//
|
||||
// if ((*itSink)->getSampleSinkGUIMessageQueue())
|
||||
// {
|
||||
// DeviceLimeSDRShared::MsgCrossReportToBuddy *reportToGUI = new DeviceLimeSDRShared::MsgCrossReportToBuddy(*report);
|
||||
// (*itSink)->getSampleSinkGUIMessageQueue()->push(reportToGUI);
|
||||
// }
|
||||
//
|
||||
// (*itSink)->getSampleSinkInputMessageQueue()->push(report);
|
||||
}
|
||||
}
|
||||
else if (forwardChangeRxDSP)
|
||||
@ -1149,22 +1080,8 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||
|
||||
for (; itSource != sourceBuddies.end(); ++itSource)
|
||||
{
|
||||
DeviceLimeSDRShared *buddySharedPtr = (DeviceLimeSDRShared *) (*itSource)->getBuddySharedPtr();
|
||||
int buddyNCOFreq = buddySharedPtr->m_ncoFrequency;
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency + buddyNCOFreq);
|
||||
(*itSource)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
|
||||
MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
||||
m_settings.m_centerFrequency,
|
||||
m_settings.m_devSampleRate,
|
||||
m_settings.m_log2HardDecim);
|
||||
|
||||
if ((*itSource)->getSampleSourceGUIMessageQueue())
|
||||
{
|
||||
MsgReportLimeSDRToBuddy *reportToGUI = new MsgReportLimeSDRToBuddy(*report);
|
||||
(*itSource)->getSampleSourceGUIMessageQueue()->push(reportToGUI);
|
||||
}
|
||||
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange *report = DeviceLimeSDRShared::MsgReportSampleRateDirChange::create(
|
||||
m_settings.m_devSampleRate, m_settings.m_log2HardDecim, true);
|
||||
(*itSource)->getSampleSourceInputMessageQueue()->push(report);
|
||||
}
|
||||
}
|
||||
|
@ -85,32 +85,6 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportLimeSDRToBuddy : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
float getCenterFrequency() const { return m_centerFrequency; }
|
||||
int getSampleRate() const { return m_sampleRate; }
|
||||
uint32_t getLog2HardDecim() const { return m_log2HardDecim; }
|
||||
|
||||
static MsgReportLimeSDRToBuddy* create(float centerFrequency, int sampleRate, uint32_t log2HardDecim)
|
||||
{
|
||||
return new MsgReportLimeSDRToBuddy(centerFrequency, sampleRate, log2HardDecim);
|
||||
}
|
||||
|
||||
private:
|
||||
float m_centerFrequency;
|
||||
int m_sampleRate;
|
||||
uint32_t m_log2HardDecim;
|
||||
|
||||
MsgReportLimeSDRToBuddy(float centerFrequency, int sampleRate, uint32_t log2HardDecim) :
|
||||
Message(),
|
||||
m_centerFrequency(centerFrequency),
|
||||
m_sampleRate(sampleRate),
|
||||
m_log2HardDecim(log2HardDecim)
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportStreamInfo : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
|
@ -139,22 +139,7 @@ bool LimeSDRInputGUI::deserialize(const QByteArray& data)
|
||||
|
||||
bool LimeSDRInputGUI::handleMessage(const Message& message)
|
||||
{
|
||||
if (LimeSDRInput::MsgReportLimeSDRToBuddy::match(message))
|
||||
{
|
||||
qDebug("LimeSDRInputGUI::handleMessagesToGUI: message: %s", message.getIdentifier());
|
||||
LimeSDRInput::MsgReportLimeSDRToBuddy& report = (LimeSDRInput::MsgReportLimeSDRToBuddy&) message;
|
||||
|
||||
m_settings.m_centerFrequency = report.getCenterFrequency();
|
||||
m_settings.m_devSampleRate = report.getSampleRate();
|
||||
m_settings.m_log2HardDecim = report.getLog2HardDecim();
|
||||
|
||||
blockApplySettings(true);
|
||||
displaySettings();
|
||||
blockApplySettings(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgReportSampleRateDirChange::match(message))
|
||||
if (DeviceLimeSDRShared::MsgReportSampleRateDirChange::match(message))
|
||||
{
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange& report = (DeviceLimeSDRShared::MsgReportSampleRateDirChange&) message;
|
||||
m_settings.m_devSampleRate = report.getDevSampleRate();
|
||||
@ -166,18 +151,6 @@ bool LimeSDRInputGUI::handleMessage(const Message& message)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
||||
{
|
||||
qDebug("LimeSDRInputGUI::handleMessagesToGUI: message: %s", message.getIdentifier());
|
||||
DeviceLimeSDRShared::MsgCrossReportToBuddy& report = (DeviceLimeSDRShared::MsgCrossReportToBuddy&) message;
|
||||
m_settings.m_devSampleRate = report.getSampleRate(); // TODO: remove from here should be done device to device
|
||||
|
||||
blockApplySettings(true);
|
||||
displaySettings();
|
||||
blockApplySettings(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (LimeSDRInput::MsgReportStreamInfo::match(message))
|
||||
{
|
||||
LimeSDRInput::MsgReportStreamInfo& report = (LimeSDRInput::MsgReportStreamInfo&) message;
|
||||
|
Loading…
Reference in New Issue
Block a user