mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
NFM modulator: GUI and modulator separation phase 1 (2)
This commit is contained in:
parent
890fd88f1f
commit
2e5380e939
@ -17,12 +17,16 @@
|
|||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QMutexLocker>
|
#include <QMutexLocker>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <complex.h>
|
#include <complex.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <dsp/upchannelizer.h>
|
#include <dsp/upchannelizer.h>
|
||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
#include "dsp/pidcontroller.h"
|
#include "dsp/pidcontroller.h"
|
||||||
|
#include "device/devicesinkapi.h"
|
||||||
|
|
||||||
#include "nfmmod.h"
|
#include "nfmmod.h"
|
||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureNFMMod, Message)
|
MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureNFMMod, Message)
|
||||||
@ -36,7 +40,8 @@ MESSAGE_CLASS_DEFINITION(NFMMod::MsgReportFileSourceStreamTiming, Message)
|
|||||||
|
|
||||||
const int NFMMod::m_levelNbSamples = 480; // every 10ms
|
const int NFMMod::m_levelNbSamples = 480; // every 10ms
|
||||||
|
|
||||||
NFMMod::NFMMod() :
|
NFMMod::NFMMod(DeviceSinkAPI *deviceAPI) :
|
||||||
|
m_deviceAPI(deviceAPI),
|
||||||
m_modPhasor(0.0f),
|
m_modPhasor(0.0f),
|
||||||
m_movingAverage(40, 0),
|
m_movingAverage(40, 0),
|
||||||
m_volumeAGC(40, 0),
|
m_volumeAGC(40, 0),
|
||||||
|
@ -36,6 +36,10 @@
|
|||||||
|
|
||||||
#include "nfmmodsettings.h"
|
#include "nfmmodsettings.h"
|
||||||
|
|
||||||
|
class DeviceSinkAPI;
|
||||||
|
class ThreadedBasebandSampleSource;
|
||||||
|
class UpChannelizer;
|
||||||
|
|
||||||
class NFMMod : public BasebandSampleSource {
|
class NFMMod : public BasebandSampleSource {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -223,7 +227,7 @@ public:
|
|||||||
|
|
||||||
//=================================================================
|
//=================================================================
|
||||||
|
|
||||||
NFMMod();
|
NFMMod(DeviceSinkAPI *deviceAPI);
|
||||||
~NFMMod();
|
~NFMMod();
|
||||||
|
|
||||||
virtual void pull(Sample& sample);
|
virtual void pull(Sample& sample);
|
||||||
@ -252,6 +256,9 @@ private:
|
|||||||
RSRunning
|
RSRunning
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DeviceSinkAPI* m_deviceAPI;
|
||||||
|
ThreadedBasebandSampleSource* m_threadedChannelizer;
|
||||||
|
UpChannelizer* m_channelizer;
|
||||||
NFMModSettings m_settings;
|
NFMModSettings m_settings;
|
||||||
|
|
||||||
NCO m_carrierNco;
|
NCO m_carrierNco;
|
||||||
|
@ -319,7 +319,7 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
|||||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||||
|
|
||||||
m_nfmMod = new NFMMod();
|
m_nfmMod = new NFMMod(m_deviceAPI);
|
||||||
m_nfmMod->setMessageQueueToGUI(getInputMessageQueue());
|
m_nfmMod->setMessageQueueToGUI(getInputMessageQueue());
|
||||||
m_channelizer = new UpChannelizer(m_nfmMod);
|
m_channelizer = new UpChannelizer(m_nfmMod);
|
||||||
m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this);
|
m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this);
|
||||||
|
Loading…
Reference in New Issue
Block a user