mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
LimeSDR: use more meaningful names for messages to buddies
This commit is contained in:
@@ -34,7 +34,7 @@ MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgConfigureLimeSDR, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgGetStreamInfo, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgGetDeviceInfo, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgSetReferenceConfig, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgReportLimeSDRToGUI, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgReportLimeSDRToBuddy, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgReportStreamInfo, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgFileRecord, Message)
|
||||
|
||||
@@ -1082,7 +1082,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||
|
||||
if ((*itSource)->getSampleSourceGUIMessageQueue())
|
||||
{
|
||||
MsgReportLimeSDRToGUI *report = MsgReportLimeSDRToGUI::create(
|
||||
MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
||||
m_settings.m_centerFrequency,
|
||||
m_settings.m_devSampleRate,
|
||||
m_settings.m_log2HardDecim);
|
||||
@@ -1107,7 +1107,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||
|
||||
if ((*itSink)->getSampleSinkGUIMessageQueue())
|
||||
{
|
||||
DeviceLimeSDRShared::MsgCrossReportToGUI *report = DeviceLimeSDRShared::MsgCrossReportToGUI::create(m_settings.m_devSampleRate);
|
||||
DeviceLimeSDRShared::MsgCrossReportToBuddy *report = DeviceLimeSDRShared::MsgCrossReportToBuddy::create(m_settings.m_devSampleRate);
|
||||
(*itSink)->getSampleSinkGUIMessageQueue()->push(report);
|
||||
}
|
||||
}
|
||||
@@ -1136,7 +1136,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||
|
||||
if ((*itSource)->getSampleSourceGUIMessageQueue())
|
||||
{
|
||||
MsgReportLimeSDRToGUI *report = MsgReportLimeSDRToGUI::create(
|
||||
MsgReportLimeSDRToBuddy *report = MsgReportLimeSDRToBuddy::create(
|
||||
m_settings.m_centerFrequency,
|
||||
m_settings.m_devSampleRate,
|
||||
m_settings.m_log2HardDecim);
|
||||
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportLimeSDRToGUI : public Message {
|
||||
class MsgReportLimeSDRToBuddy : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
@@ -110,9 +110,9 @@ public:
|
||||
int getSampleRate() const { return m_sampleRate; }
|
||||
uint32_t getLog2HardDecim() const { return m_log2HardDecim; }
|
||||
|
||||
static MsgReportLimeSDRToGUI* create(float centerFrequency, int sampleRate, uint32_t log2HardDecim)
|
||||
static MsgReportLimeSDRToBuddy* create(float centerFrequency, int sampleRate, uint32_t log2HardDecim)
|
||||
{
|
||||
return new MsgReportLimeSDRToGUI(centerFrequency, sampleRate, log2HardDecim);
|
||||
return new MsgReportLimeSDRToBuddy(centerFrequency, sampleRate, log2HardDecim);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
int m_sampleRate;
|
||||
uint32_t m_log2HardDecim;
|
||||
|
||||
MsgReportLimeSDRToGUI(float centerFrequency, int sampleRate, uint32_t log2HardDecim) :
|
||||
MsgReportLimeSDRToBuddy(float centerFrequency, int sampleRate, uint32_t log2HardDecim) :
|
||||
Message(),
|
||||
m_centerFrequency(centerFrequency),
|
||||
m_sampleRate(sampleRate),
|
||||
|
||||
@@ -139,9 +139,9 @@ bool LimeSDRInputGUI::deserialize(const QByteArray& data)
|
||||
|
||||
bool LimeSDRInputGUI::handleMessage(const Message& message)
|
||||
{
|
||||
if (LimeSDRInput::MsgReportLimeSDRToGUI::match(message))
|
||||
if (LimeSDRInput::MsgReportLimeSDRToBuddy::match(message))
|
||||
{
|
||||
LimeSDRInput::MsgReportLimeSDRToGUI& report = (LimeSDRInput::MsgReportLimeSDRToGUI&) message;
|
||||
LimeSDRInput::MsgReportLimeSDRToBuddy& report = (LimeSDRInput::MsgReportLimeSDRToBuddy&) message;
|
||||
|
||||
m_settings.m_centerFrequency = report.getCenterFrequency();
|
||||
m_settings.m_devSampleRate = report.getSampleRate();
|
||||
@@ -156,9 +156,9 @@ bool LimeSDRInputGUI::handleMessage(const Message& message)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DeviceLimeSDRShared::MsgCrossReportToGUI::match(message))
|
||||
else if (DeviceLimeSDRShared::MsgCrossReportToBuddy::match(message))
|
||||
{
|
||||
DeviceLimeSDRShared::MsgCrossReportToGUI& report = (DeviceLimeSDRShared::MsgCrossReportToGUI&) message;
|
||||
DeviceLimeSDRShared::MsgCrossReportToBuddy& report = (DeviceLimeSDRShared::MsgCrossReportToBuddy&) message;
|
||||
m_settings.m_devSampleRate = report.getSampleRate(); // TODO: remove from here should be done device to device
|
||||
|
||||
blockApplySettings(true);
|
||||
|
||||
Reference in New Issue
Block a user