1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

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

This commit is contained in:
f4exb 2017-10-12 21:26:33 +02:00
parent 890fd88f1f
commit 2e5380e939
3 changed files with 15 additions and 3 deletions

View File

@ -17,12 +17,16 @@
#include <QTime>
#include <QDebug>
#include <QMutexLocker>
#include <stdio.h>
#include <complex.h>
#include <algorithm>
#include <dsp/upchannelizer.h>
#include "dsp/dspengine.h"
#include "dsp/pidcontroller.h"
#include "device/devicesinkapi.h"
#include "nfmmod.h"
MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureNFMMod, Message)
@ -36,7 +40,8 @@ MESSAGE_CLASS_DEFINITION(NFMMod::MsgReportFileSourceStreamTiming, Message)
const int NFMMod::m_levelNbSamples = 480; // every 10ms
NFMMod::NFMMod() :
NFMMod::NFMMod(DeviceSinkAPI *deviceAPI) :
m_deviceAPI(deviceAPI),
m_modPhasor(0.0f),
m_movingAverage(40, 0),
m_volumeAGC(40, 0),

View File

@ -36,6 +36,10 @@
#include "nfmmodsettings.h"
class DeviceSinkAPI;
class ThreadedBasebandSampleSource;
class UpChannelizer;
class NFMMod : public BasebandSampleSource {
Q_OBJECT
@ -223,7 +227,7 @@ public:
//=================================================================
NFMMod();
NFMMod(DeviceSinkAPI *deviceAPI);
~NFMMod();
virtual void pull(Sample& sample);
@ -252,6 +256,9 @@ private:
RSRunning
};
DeviceSinkAPI* m_deviceAPI;
ThreadedBasebandSampleSource* m_threadedChannelizer;
UpChannelizer* m_channelizer;
NFMModSettings m_settings;
NCO m_carrierNco;

View File

@ -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(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
m_nfmMod = new NFMMod();
m_nfmMod = new NFMMod(m_deviceAPI);
m_nfmMod->setMessageQueueToGUI(getInputMessageQueue());
m_channelizer = new UpChannelizer(m_nfmMod);
m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this);