mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 17:58:43 -05:00
LimeSDR: set buddy configuration from the source or sink and not from the GUI
This commit is contained in:
parent
d59d2a2372
commit
b5a7a65d85
@ -31,7 +31,6 @@
|
|||||||
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgConfigureLimeSDR, Message)
|
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgConfigureLimeSDR, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgGetStreamInfo, Message)
|
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgGetStreamInfo, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgGetDeviceInfo, Message)
|
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgGetDeviceInfo, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgSetReferenceConfig, Message)
|
|
||||||
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgReportLimeSDRToBuddy, Message)
|
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgReportLimeSDRToBuddy, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgReportStreamInfo, Message)
|
MESSAGE_CLASS_DEFINITION(LimeSDROutput::MsgReportStreamInfo, Message)
|
||||||
|
|
||||||
@ -412,13 +411,20 @@ bool LimeSDROutput::handleMessage(const Message& message)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgSetReferenceConfig::match(message))
|
else if (MsgReportLimeSDRToBuddy::match(message))
|
||||||
{
|
{
|
||||||
MsgSetReferenceConfig& conf = (MsgSetReferenceConfig&) message;
|
MsgReportLimeSDRToBuddy& conf = (MsgReportLimeSDRToBuddy&) message;
|
||||||
qDebug() << "LimeSDROutput::handleMessage: MsgSetReferenceConfig";
|
m_settings.m_centerFrequency = conf.getCenterFrequency();
|
||||||
m_settings = conf.getSettings();
|
m_settings.m_devSampleRate = conf.getSampleRate();
|
||||||
m_deviceShared.m_ncoFrequency = m_settings.m_ncoEnable ? m_settings.m_ncoFrequency : 0; // for buddies
|
m_settings.m_log2HardInterp = conf.getLog2HardInterp();
|
||||||
m_deviceShared.m_centerFrequency = m_settings.m_centerFrequency; // for buddies
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
||||||
|
{
|
||||||
|
DeviceLimeSDRShared::MsgCrossReportToBuddy& conf = (DeviceLimeSDRShared::MsgCrossReportToBuddy&) message;
|
||||||
|
m_settings.m_devSampleRate = conf.getSampleRate();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgGetStreamInfo::match(message))
|
else if (MsgGetStreamInfo::match(message))
|
||||||
@ -918,14 +924,18 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
|||||||
m_settings.m_centerFrequency + buddyNCOFreq); // do not change center frequency
|
m_settings.m_centerFrequency + buddyNCOFreq); // do not change center frequency
|
||||||
(*itSink)->getDeviceEngineInputMessageQueue()->push(notif);
|
(*itSink)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||||
|
|
||||||
|
MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
||||||
|
m_settings.m_centerFrequency,
|
||||||
|
m_settings.m_devSampleRate,
|
||||||
|
m_settings.m_log2HardInterp);
|
||||||
|
|
||||||
if ((*itSink)->getSampleSinkGUIMessageQueue())
|
if ((*itSink)->getSampleSinkGUIMessageQueue())
|
||||||
{
|
{
|
||||||
MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
MsgReportLimeSDRToBuddy *reportToGUI = new MsgReportLimeSDRToBuddy(*report);
|
||||||
m_settings.m_centerFrequency,
|
(*itSink)->getSampleSinkGUIMessageQueue()->push(reportToGUI);
|
||||||
m_settings.m_devSampleRate,
|
|
||||||
m_settings.m_log2HardInterp);
|
|
||||||
(*itSink)->getSampleSinkGUIMessageQueue()->push(report);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(*itSink)->getSampleSinkInputMessageQueue()->push(report);
|
||||||
}
|
}
|
||||||
|
|
||||||
// send to source buddies
|
// send to source buddies
|
||||||
@ -943,11 +953,15 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
|||||||
buddyCenterFreq + buddyNCOFreq);
|
buddyCenterFreq + buddyNCOFreq);
|
||||||
(*itSource)->getDeviceEngineInputMessageQueue()->push(notif);
|
(*itSource)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||||
|
|
||||||
|
DeviceLimeSDRShared::MsgCrossReportToBuddy *report = DeviceLimeSDRShared::MsgCrossReportToBuddy::create(m_settings.m_devSampleRate);
|
||||||
|
|
||||||
if ((*itSource)->getSampleSourceGUIMessageQueue())
|
if ((*itSource)->getSampleSourceGUIMessageQueue())
|
||||||
{
|
{
|
||||||
DeviceLimeSDRShared::MsgCrossReportToBuddy *report = DeviceLimeSDRShared::MsgCrossReportToBuddy::create(m_settings.m_devSampleRate);
|
DeviceLimeSDRShared::MsgCrossReportToBuddy *reportToGUI = new DeviceLimeSDRShared::MsgCrossReportToBuddy(*report);
|
||||||
(*itSource)->getSampleSourceGUIMessageQueue()->push(report);
|
(*itSource)->getSampleSourceGUIMessageQueue()->push(reportToGUI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(*itSource)->getSampleSourceInputMessageQueue()->push(report);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (forwardChangeTxDSP)
|
else if (forwardChangeTxDSP)
|
||||||
@ -973,14 +987,18 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
|||||||
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, buddyCenterFreq + buddyNCOFreq); // do not change center frequency
|
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, buddyCenterFreq + buddyNCOFreq); // do not change center frequency
|
||||||
(*itSink)->getDeviceEngineInputMessageQueue()->push(notif);
|
(*itSink)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||||
|
|
||||||
|
MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
||||||
|
m_settings.m_centerFrequency,
|
||||||
|
m_settings.m_devSampleRate,
|
||||||
|
m_settings.m_log2HardInterp);
|
||||||
|
|
||||||
if ((*itSink)->getSampleSinkGUIMessageQueue())
|
if ((*itSink)->getSampleSinkGUIMessageQueue())
|
||||||
{
|
{
|
||||||
MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
MsgReportLimeSDRToBuddy *reportToGUI = new MsgReportLimeSDRToBuddy(*report);
|
||||||
m_settings.m_centerFrequency,
|
(*itSink)->getSampleSinkGUIMessageQueue()->push(reportToGUI);
|
||||||
m_settings.m_devSampleRate,
|
|
||||||
m_settings.m_log2HardInterp);
|
|
||||||
(*itSink)->getSampleSinkGUIMessageQueue()->push(report);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(*itSink)->getSampleSinkInputMessageQueue()->push(report);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (forwardChangeOwnDSP)
|
else if (forwardChangeOwnDSP)
|
||||||
|
@ -51,26 +51,6 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MsgSetReferenceConfig : public Message {
|
|
||||||
MESSAGE_CLASS_DECLARATION
|
|
||||||
|
|
||||||
public:
|
|
||||||
const LimeSDROutputSettings& getSettings() const { return m_settings; }
|
|
||||||
|
|
||||||
static MsgSetReferenceConfig* create(const LimeSDROutputSettings& settings)
|
|
||||||
{
|
|
||||||
return new MsgSetReferenceConfig(settings);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
LimeSDROutputSettings m_settings;
|
|
||||||
|
|
||||||
MsgSetReferenceConfig(const LimeSDROutputSettings& settings) :
|
|
||||||
Message(),
|
|
||||||
m_settings(settings)
|
|
||||||
{ }
|
|
||||||
};
|
|
||||||
|
|
||||||
class MsgGetStreamInfo : public Message {
|
class MsgGetStreamInfo : public Message {
|
||||||
MESSAGE_CLASS_DECLARATION
|
MESSAGE_CLASS_DECLARATION
|
||||||
|
|
||||||
|
@ -152,9 +152,6 @@ bool LimeSDROutputGUI::handleMessage(const Message& message)
|
|||||||
displaySettings();
|
displaySettings();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
|
|
||||||
LimeSDROutput::MsgSetReferenceConfig* conf = LimeSDROutput::MsgSetReferenceConfig::create(m_settings);
|
|
||||||
m_sampleSink->getInputMessageQueue()->push(conf); // TODO: remove from here should be done device to device
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
||||||
@ -166,9 +163,6 @@ bool LimeSDROutputGUI::handleMessage(const Message& message)
|
|||||||
displaySettings();
|
displaySettings();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
|
|
||||||
LimeSDROutput::MsgSetReferenceConfig* conf = LimeSDROutput::MsgSetReferenceConfig::create(m_settings);
|
|
||||||
m_sampleSink->getInputMessageQueue()->push(conf); // TODO: remove from here should be done device to device
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (LimeSDROutput::MsgReportStreamInfo::match(message))
|
else if (LimeSDROutput::MsgReportStreamInfo::match(message))
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgConfigureLimeSDR, Message)
|
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgConfigureLimeSDR, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgGetStreamInfo, Message)
|
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgGetStreamInfo, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgGetDeviceInfo, Message)
|
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgGetDeviceInfo, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgSetReferenceConfig, Message)
|
|
||||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgReportLimeSDRToBuddy, Message)
|
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgReportLimeSDRToBuddy, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgReportStreamInfo, Message)
|
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgReportStreamInfo, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgFileRecord, Message)
|
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgFileRecord, Message)
|
||||||
@ -410,13 +409,20 @@ bool LimeSDRInput::handleMessage(const Message& message)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgSetReferenceConfig::match(message))
|
else if (MsgReportLimeSDRToBuddy::match(message))
|
||||||
{
|
{
|
||||||
MsgSetReferenceConfig& conf = (MsgSetReferenceConfig&) message;
|
MsgReportLimeSDRToBuddy& conf = (MsgReportLimeSDRToBuddy&) message;
|
||||||
qDebug() << "LimeSDRInput::handleMessage: MsgSetReferenceConfig";
|
m_settings.m_centerFrequency = conf.getCenterFrequency();
|
||||||
m_settings = conf.getSettings();
|
m_settings.m_devSampleRate = conf.getSampleRate();
|
||||||
m_deviceShared.m_ncoFrequency = m_settings.m_ncoEnable ? m_settings.m_ncoFrequency : 0; // for buddies
|
m_settings.m_log2HardDecim = conf.getLog2HardDecim();
|
||||||
m_deviceShared.m_centerFrequency = m_settings.m_centerFrequency; // for buddies
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
||||||
|
{
|
||||||
|
DeviceLimeSDRShared::MsgCrossReportToBuddy& conf = (DeviceLimeSDRShared::MsgCrossReportToBuddy&) message;
|
||||||
|
m_settings.m_devSampleRate = conf.getSampleRate();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgGetStreamInfo::match(message))
|
else if (MsgGetStreamInfo::match(message))
|
||||||
@ -1080,14 +1086,18 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
|||||||
m_settings.m_centerFrequency + buddyNCOFreq);
|
m_settings.m_centerFrequency + buddyNCOFreq);
|
||||||
(*itSource)->getDeviceEngineInputMessageQueue()->push(notif);
|
(*itSource)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||||
|
|
||||||
|
MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
||||||
|
m_settings.m_centerFrequency,
|
||||||
|
m_settings.m_devSampleRate,
|
||||||
|
m_settings.m_log2HardDecim);
|
||||||
|
|
||||||
if ((*itSource)->getSampleSourceGUIMessageQueue())
|
if ((*itSource)->getSampleSourceGUIMessageQueue())
|
||||||
{
|
{
|
||||||
MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
MsgReportLimeSDRToBuddy *reportToGUI = new MsgReportLimeSDRToBuddy(*report);
|
||||||
m_settings.m_centerFrequency,
|
(*itSource)->getSampleSourceGUIMessageQueue()->push(reportToGUI);
|
||||||
m_settings.m_devSampleRate,
|
|
||||||
m_settings.m_log2HardDecim);
|
|
||||||
(*itSource)->getSampleSourceGUIMessageQueue()->push(report);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(*itSource)->getSampleSourceInputMessageQueue()->push(report);
|
||||||
}
|
}
|
||||||
|
|
||||||
// send to sink buddies
|
// send to sink buddies
|
||||||
@ -1105,11 +1115,15 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
|||||||
buddyCenterFreq + buddyNCOFreq); // do not change center frequency
|
buddyCenterFreq + buddyNCOFreq); // do not change center frequency
|
||||||
(*itSink)->getDeviceEngineInputMessageQueue()->push(notif);
|
(*itSink)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||||
|
|
||||||
|
DeviceLimeSDRShared::MsgCrossReportToBuddy *report = DeviceLimeSDRShared::MsgCrossReportToBuddy::create(m_settings.m_devSampleRate);
|
||||||
|
|
||||||
if ((*itSink)->getSampleSinkGUIMessageQueue())
|
if ((*itSink)->getSampleSinkGUIMessageQueue())
|
||||||
{
|
{
|
||||||
DeviceLimeSDRShared::MsgCrossReportToBuddy *report = DeviceLimeSDRShared::MsgCrossReportToBuddy::create(m_settings.m_devSampleRate);
|
DeviceLimeSDRShared::MsgCrossReportToBuddy *reportToGUI = new DeviceLimeSDRShared::MsgCrossReportToBuddy(*report);
|
||||||
(*itSink)->getSampleSinkGUIMessageQueue()->push(report);
|
(*itSink)->getSampleSinkGUIMessageQueue()->push(reportToGUI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(*itSink)->getSampleSinkInputMessageQueue()->push(report);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (forwardChangeRxDSP)
|
else if (forwardChangeRxDSP)
|
||||||
@ -1134,14 +1148,18 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
|||||||
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency + buddyNCOFreq);
|
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency + buddyNCOFreq);
|
||||||
(*itSource)->getDeviceEngineInputMessageQueue()->push(notif);
|
(*itSource)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||||
|
|
||||||
|
MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
||||||
|
m_settings.m_centerFrequency,
|
||||||
|
m_settings.m_devSampleRate,
|
||||||
|
m_settings.m_log2HardDecim);
|
||||||
|
|
||||||
if ((*itSource)->getSampleSourceGUIMessageQueue())
|
if ((*itSource)->getSampleSourceGUIMessageQueue())
|
||||||
{
|
{
|
||||||
MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
MsgReportLimeSDRToBuddy *reportToGUI = new MsgReportLimeSDRToBuddy(*report);
|
||||||
m_settings.m_centerFrequency,
|
(*itSource)->getSampleSourceGUIMessageQueue()->push(reportToGUI);
|
||||||
m_settings.m_devSampleRate,
|
|
||||||
m_settings.m_log2HardDecim);
|
|
||||||
(*itSource)->getSampleSourceGUIMessageQueue()->push(report);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(*itSource)->getSampleSourceInputMessageQueue()->push(report);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (forwardChangeOwnDSP)
|
else if (forwardChangeOwnDSP)
|
||||||
|
@ -52,26 +52,6 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MsgSetReferenceConfig : public Message {
|
|
||||||
MESSAGE_CLASS_DECLARATION
|
|
||||||
|
|
||||||
public:
|
|
||||||
const LimeSDRInputSettings& getSettings() const { return m_settings; }
|
|
||||||
|
|
||||||
static MsgSetReferenceConfig* create(const LimeSDRInputSettings& settings)
|
|
||||||
{
|
|
||||||
return new MsgSetReferenceConfig(settings);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
LimeSDRInputSettings m_settings;
|
|
||||||
|
|
||||||
MsgSetReferenceConfig(const LimeSDRInputSettings& settings) :
|
|
||||||
Message(),
|
|
||||||
m_settings(settings)
|
|
||||||
{ }
|
|
||||||
};
|
|
||||||
|
|
||||||
class MsgGetStreamInfo : public Message {
|
class MsgGetStreamInfo : public Message {
|
||||||
MESSAGE_CLASS_DECLARATION
|
MESSAGE_CLASS_DECLARATION
|
||||||
|
|
||||||
|
@ -151,9 +151,6 @@ bool LimeSDRInputGUI::handleMessage(const Message& message)
|
|||||||
displaySettings();
|
displaySettings();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
|
|
||||||
LimeSDRInput::MsgSetReferenceConfig* conf = LimeSDRInput::MsgSetReferenceConfig::create(m_settings);
|
|
||||||
m_sampleSource->getInputMessageQueue()->push(conf); // TODO: remove from here should be done device to device
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
||||||
@ -165,9 +162,6 @@ bool LimeSDRInputGUI::handleMessage(const Message& message)
|
|||||||
displaySettings();
|
displaySettings();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
|
|
||||||
LimeSDRInput::MsgSetReferenceConfig* conf = LimeSDRInput::MsgSetReferenceConfig::create(m_settings);
|
|
||||||
m_sampleSource->getInputMessageQueue()->push(conf);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (LimeSDRInput::MsgReportStreamInfo::match(message))
|
else if (LimeSDRInput::MsgReportStreamInfo::match(message))
|
||||||
|
Loading…
Reference in New Issue
Block a user