mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-17 05:41:56 -05:00
LimeSDR: device sample rate and hardware decimation/interpolation handling fix and simplification
This commit is contained in:
parent
61afe840dc
commit
238c8d312e
@ -16,6 +16,7 @@
|
||||
|
||||
#include "devicelimesdrshared.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgReportSampleRateDirChange, Message)
|
||||
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgCrossReportToBuddy, Message)
|
||||
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgReportDeviceInfo, Message)
|
||||
|
||||
|
@ -47,6 +47,32 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportSampleRateDirChange : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
int getDevSampleRate() const { return m_devSampleRate; }
|
||||
int getLog2HardDecimInterp() const { return m_log2HardDecimInterp; }
|
||||
bool getRxElseTx() const { return m_rxElseTx; }
|
||||
|
||||
static MsgReportSampleRateDirChange* create(int devSampleRate, int log2HardDecimInterp, bool rxElseTx)
|
||||
{
|
||||
return new MsgReportSampleRateDirChange(devSampleRate, log2HardDecimInterp, rxElseTx);
|
||||
}
|
||||
|
||||
private:
|
||||
int m_devSampleRate; //!< device/host sample rate
|
||||
int m_log2HardDecimInterp; //!< log2 of hardware decimation or interpolation
|
||||
bool m_rxElseTx; //!< tells which side initiated the message
|
||||
|
||||
MsgReportSampleRateDirChange(int devSampleRate, int log2HardDecimInterp, bool rxElseTx) :
|
||||
Message(),
|
||||
m_devSampleRate(devSampleRate),
|
||||
m_log2HardDecimInterp(log2HardDecimInterp),
|
||||
m_rxElseTx(rxElseTx)
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportDeviceInfo : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
|
@ -456,6 +456,39 @@ bool LimeSDROutput::handleMessage(const Message& message)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgReportSampleRateDirChange::match(message))
|
||||
{
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange& report = (DeviceLimeSDRShared::MsgReportSampleRateDirChange&) message;
|
||||
|
||||
if (report.getRxElseTx())
|
||||
{
|
||||
int adcdac_rate = report.getDevSampleRate() * (1<<report.getLog2HardDecimInterp());
|
||||
m_settings.m_devSampleRate = adcdac_rate / (1<<m_settings.m_log2HardInterp); // new device to host sample rate
|
||||
}
|
||||
else
|
||||
{
|
||||
m_settings.m_devSampleRate = report.getDevSampleRate();
|
||||
m_settings.m_log2HardInterp = report.getLog2HardDecimInterp();
|
||||
}
|
||||
|
||||
if (m_settings.m_ncoEnable) // need to reset NCO after sample rate change
|
||||
{
|
||||
applySettings(m_settings, false, true);
|
||||
}
|
||||
|
||||
int ncoShift = m_settings.m_ncoEnable ? m_settings.m_ncoFrequency : 0;
|
||||
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(
|
||||
m_settings.m_devSampleRate/(1<<m_settings.m_log2SoftInterp),
|
||||
m_settings.m_centerFrequency + ncoShift);
|
||||
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange *reportToGUI = DeviceLimeSDRShared::MsgReportSampleRateDirChange::create(
|
||||
m_settings.m_devSampleRate, m_settings.m_log2HardInterp, false);
|
||||
getMessageQueueToGUI()->push(reportToGUI);
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
||||
{
|
||||
DeviceLimeSDRShared::MsgCrossReportToBuddy& conf = (DeviceLimeSDRShared::MsgCrossReportToBuddy&) message;
|
||||
@ -563,7 +596,7 @@ bool LimeSDROutput::handleMessage(const Message& message)
|
||||
}
|
||||
}
|
||||
|
||||
bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool force)
|
||||
bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool force, bool forceNCOFrequency)
|
||||
{
|
||||
bool forwardChangeOwnDSP = false;
|
||||
bool forwardChangeTxDSP = false;
|
||||
@ -573,21 +606,23 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
||||
bool suspendTxThread = false;
|
||||
bool suspendAllThread = false;
|
||||
bool doCalibration = false;
|
||||
bool forceNCOFrequency = 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) || force)
|
||||
if ((m_settings.m_devSampleRate != settings.m_devSampleRate) ||
|
||||
(m_settings.m_log2HardInterp != settings.m_log2HardInterp) ||
|
||||
(m_settings.m_centerFrequency != settings.m_centerFrequency) ||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_log2HardInterp != settings.m_log2HardInterp) ||
|
||||
// (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) ||
|
||||
@ -656,8 +691,8 @@ 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 = m_settings.m_devSampleRate != settings.m_devSampleRate;
|
||||
// forwardChangeTxDSP = m_settings.m_log2HardInterp != settings.m_log2HardInterp;
|
||||
forwardChangeAllDSP = true; //m_settings.m_devSampleRate != settings.m_devSampleRate;
|
||||
|
||||
if (m_deviceShared.m_deviceParams->getDevice() != 0)
|
||||
{
|
||||
@ -882,26 +917,30 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
||||
|
||||
for (; itSink != sinkBuddies.end(); ++itSink)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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
|
||||
@ -910,24 +949,28 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
||||
|
||||
for (; itSource != sourceBuddies.end(); ++itSource)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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)
|
||||
|
@ -230,7 +230,7 @@ private:
|
||||
void resumeRxBuddies();
|
||||
void suspendTxBuddies();
|
||||
void resumeTxBuddies();
|
||||
bool applySettings(const LimeSDROutputSettings& settings, bool force = false);
|
||||
bool applySettings(const LimeSDROutputSettings& settings, bool force = false, bool forceNCOFrequency = false);
|
||||
};
|
||||
|
||||
#endif /* PLUGINS_SAMPLESOURCE_LIMESDROUTPUT_LIMESDROUTPUT_H_ */
|
||||
|
@ -156,6 +156,18 @@ bool LimeSDROutputGUI::handleMessage(const Message& message)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgReportSampleRateDirChange::match(message))
|
||||
{
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange& report = (DeviceLimeSDRShared::MsgReportSampleRateDirChange&) message;
|
||||
m_settings.m_devSampleRate = report.getDevSampleRate();
|
||||
m_settings.m_log2HardInterp = report.getLog2HardDecimInterp();
|
||||
|
||||
blockApplySettings(true);
|
||||
displaySettings();
|
||||
blockApplySettings(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
||||
{
|
||||
qDebug("LimeSDROutputGUI::handleMessagesToGUI: message: %s", message.getIdentifier());
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
const PluginDescriptor LimeSDROutputPlugin::m_pluginDescriptor = {
|
||||
QString("LimeSDR Output"),
|
||||
QString("3.7.4"),
|
||||
QString("3.7.6"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -441,6 +441,39 @@ bool LimeSDRInput::handleMessage(const Message& message)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgReportSampleRateDirChange::match(message))
|
||||
{
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange& report = (DeviceLimeSDRShared::MsgReportSampleRateDirChange&) message;
|
||||
|
||||
if (report.getRxElseTx())
|
||||
{
|
||||
m_settings.m_devSampleRate = report.getDevSampleRate();
|
||||
m_settings.m_log2HardDecim = report.getLog2HardDecimInterp();
|
||||
}
|
||||
else
|
||||
{
|
||||
int adcdac_rate = report.getDevSampleRate() * (1<<report.getLog2HardDecimInterp());
|
||||
m_settings.m_devSampleRate = adcdac_rate / (1<<m_settings.m_log2HardDecim); // new device to host sample rate
|
||||
}
|
||||
|
||||
if (m_settings.m_ncoEnable) // need to reset NCO after sample rate change
|
||||
{
|
||||
applySettings(m_settings, false, true);
|
||||
}
|
||||
|
||||
int ncoShift = m_settings.m_ncoEnable ? m_settings.m_ncoFrequency : 0;
|
||||
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(
|
||||
m_settings.m_devSampleRate/(1<<m_settings.m_log2SoftDecim),
|
||||
m_settings.m_centerFrequency + ncoShift);
|
||||
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange *reportToGUI = DeviceLimeSDRShared::MsgReportSampleRateDirChange::create(
|
||||
m_settings.m_devSampleRate, m_settings.m_log2HardDecim, true);
|
||||
getMessageQueueToGUI()->push(reportToGUI);
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
||||
{
|
||||
DeviceLimeSDRShared::MsgCrossReportToBuddy& conf = (DeviceLimeSDRShared::MsgCrossReportToBuddy&) message;
|
||||
@ -561,7 +594,7 @@ bool LimeSDRInput::handleMessage(const Message& message)
|
||||
}
|
||||
}
|
||||
|
||||
bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool force)
|
||||
bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool force, bool forceNCOFrequency)
|
||||
{
|
||||
bool forwardChangeOwnDSP = false;
|
||||
bool forwardChangeRxDSP = false;
|
||||
@ -572,21 +605,23 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||
bool suspendAllThread = false;
|
||||
bool doCalibration = false;
|
||||
bool setAntennaAuto = false;
|
||||
bool forceNCOFrequency = 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) || force)
|
||||
if ((m_settings.m_devSampleRate != settings.m_devSampleRate) ||
|
||||
(m_settings.m_log2HardDecim != settings.m_log2HardDecim) ||
|
||||
(m_settings.m_centerFrequency != settings.m_centerFrequency) || 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_log2HardDecim != settings.m_log2HardDecim) ||
|
||||
// (m_settings.m_centerFrequency != settings.m_centerFrequency) || force)
|
||||
// {
|
||||
// suspendRxThread = true;
|
||||
// }
|
||||
|
||||
if ((m_settings.m_antennaPath != settings.m_antennaPath) &&
|
||||
(m_settings.m_antennaPath == 0))
|
||||
@ -800,8 +835,8 @@ 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 = m_settings.m_devSampleRate != settings.m_devSampleRate;
|
||||
// forwardChangeRxDSP = m_settings.m_log2HardDecim != settings.m_log2HardDecim;
|
||||
forwardChangeAllDSP = true; //m_settings.m_devSampleRate != settings.m_devSampleRate;
|
||||
|
||||
m_settings.m_devSampleRate = settings.m_devSampleRate;
|
||||
m_settings.m_log2HardDecim = settings.m_log2HardDecim;
|
||||
@ -1041,26 +1076,30 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||
|
||||
for (; itSource != sourceBuddies.end(); ++itSource)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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
|
||||
@ -1069,24 +1108,28 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||
|
||||
for (; itSink != sinkBuddies.end(); ++itSink)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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)
|
||||
|
@ -247,7 +247,7 @@ private:
|
||||
void resumeRxBuddies();
|
||||
void suspendTxBuddies();
|
||||
void resumeTxBuddies();
|
||||
bool applySettings(const LimeSDRInputSettings& settings, bool force = false);
|
||||
bool applySettings(const LimeSDRInputSettings& settings, bool force = false, bool forceNCOFrequency = false);
|
||||
};
|
||||
|
||||
#endif /* PLUGINS_SAMPLESOURCE_LIMESDRINPUT_LIMESDRINPUT_H_ */
|
||||
|
@ -154,6 +154,18 @@ bool LimeSDRInputGUI::handleMessage(const Message& message)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgReportSampleRateDirChange::match(message))
|
||||
{
|
||||
DeviceLimeSDRShared::MsgReportSampleRateDirChange& report = (DeviceLimeSDRShared::MsgReportSampleRateDirChange&) message;
|
||||
m_settings.m_devSampleRate = report.getDevSampleRate();
|
||||
m_settings.m_log2HardDecim = report.getLog2HardDecimInterp();
|
||||
|
||||
blockApplySettings(true);
|
||||
displaySettings();
|
||||
blockApplySettings(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
||||
{
|
||||
qDebug("LimeSDRInputGUI::handleMessagesToGUI: message: %s", message.getIdentifier());
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
const PluginDescriptor LimeSDRInputPlugin::m_pluginDescriptor = {
|
||||
QString("LimeSDR Input"),
|
||||
QString("3.7.4"),
|
||||
QString("3.7.6"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
Loading…
Reference in New Issue
Block a user