1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-16 13:21:50 -05:00

NFM modulator: GUI and modulator separation phase 1 (1)

This commit is contained in:
f4exb 2017-10-12 20:33:16 +02:00
parent 028cf1e4eb
commit 890fd88f1f
2 changed files with 38 additions and 0 deletions

View File

@ -26,6 +26,7 @@
#include "nfmmod.h" #include "nfmmod.h"
MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureNFMMod, Message) MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureNFMMod, Message)
MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureChannelizer, Message)
MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureFileSourceName, Message) MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureFileSourceName, Message)
MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureFileSourceSeek, Message) MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureFileSourceSeek, Message)
MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureAFInput, Message) MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureAFInput, Message)
@ -275,6 +276,20 @@ bool NFMMod::handleMessage(const Message& cmd)
return true; return true;
} }
else if (MsgConfigureChannelizer::match(cmd))
{
MsgConfigureChannelizer& cfg = (MsgConfigureChannelizer&) cmd;
// m_channelizer->configure(m_channelizer->getInputMessageQueue(),
// cfg.getSampleRate(),
// cfg.getCenterFrequency());
qDebug() << "NFMMod::handleMessage: MsgConfigureChannelizer:"
<< " getSampleRate: " << cfg.getSampleRate()
<< " getCenterFrequency: " << cfg.getCenterFrequency();
return true;
}
else if (MsgConfigureNFMMod::match(cmd)) else if (MsgConfigureNFMMod::match(cmd))
{ {
MsgConfigureNFMMod& cfg = (MsgConfigureNFMMod&) cmd; MsgConfigureNFMMod& cfg = (MsgConfigureNFMMod&) cmd;

View File

@ -63,6 +63,29 @@ public:
{ } { }
}; };
class MsgConfigureChannelizer : public Message {
MESSAGE_CLASS_DECLARATION
public:
int getSampleRate() const { return m_sampleRate; }
int getCenterFrequency() const { return m_centerFrequency; }
static MsgConfigureChannelizer* create(int sampleRate, int centerFrequency)
{
return new MsgConfigureChannelizer(sampleRate, centerFrequency);
}
private:
int m_sampleRate;
int m_centerFrequency;
MsgConfigureChannelizer(int sampleRate, int centerFrequency) :
Message(),
m_sampleRate(sampleRate),
m_centerFrequency(centerFrequency)
{ }
};
typedef enum typedef enum
{ {
NFMModInputNone, NFMModInputNone,