mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-06 11:39:02 -04:00
Rx channel plugins: use the demodulator constructor separated from the demodulator GUI constructor
This commit is contained in:
parent
f2b53fe3aa
commit
c4e26bf66d
@ -38,9 +38,9 @@
|
||||
|
||||
#include "chanalyzer.h"
|
||||
|
||||
ChannelAnalyzerGUI* ChannelAnalyzerGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
ChannelAnalyzerGUI* ChannelAnalyzerGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
ChannelAnalyzerGUI* gui = new ChannelAnalyzerGUI(pluginAPI, deviceUISet);
|
||||
ChannelAnalyzerGUI* gui = new ChannelAnalyzerGUI(pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -321,7 +321,7 @@ void ChannelAnalyzerGUI::onMenuDoubleClicked()
|
||||
}
|
||||
}
|
||||
|
||||
ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::ChannelAnalyzerGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
@ -342,7 +342,7 @@ ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *device
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_scopeVis = new ScopeVis(ui->glScope);
|
||||
m_spectrumScopeComboVis = new SpectrumScopeComboVis(m_spectrumVis, m_scopeVis);
|
||||
m_channelAnalyzer = new ChannelAnalyzer(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_channelAnalyzer = (ChannelAnalyzer*) rxChannel; //new ChannelAnalyzer(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_channelAnalyzer->setSampleSink(m_spectrumScopeComboVis);
|
||||
m_channelAnalyzer->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
@ -384,7 +384,7 @@ ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *device
|
||||
ChannelAnalyzerGUI::~ChannelAnalyzerGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_channelAnalyzer;
|
||||
delete m_channelAnalyzer; // TODO: check this: when the GUI closes it has to delete the demodulator
|
||||
delete m_spectrumVis;
|
||||
delete m_scopeVis;
|
||||
delete m_spectrumScopeComboVis;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class BasebandSampleSink;
|
||||
class ThreadedBasebandSampleSink;
|
||||
class DownChannelizer;
|
||||
class ChannelAnalyzer;
|
||||
@ -41,7 +41,7 @@ class ChannelAnalyzerGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static ChannelAnalyzerGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUIset);
|
||||
static ChannelAnalyzerGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUIset, BasebandSampleSink *rxChannel);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -88,7 +88,7 @@ private:
|
||||
ScopeVis* m_scopeVis;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
explicit ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
virtual ~ChannelAnalyzerGUI();
|
||||
|
||||
int getEffectiveLowCutoff(int lowCutoff);
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = {
|
||||
QString("Channel Analyzer"),
|
||||
QString("3.8.0"),
|
||||
QString("3.8.2"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -34,11 +34,11 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(ChannelAnalyzer::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
if(channelName == ChannelAnalyzer::m_channelID)
|
||||
{
|
||||
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet);
|
||||
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
} else {
|
||||
return NULL;
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
private:
|
||||
|
@ -38,9 +38,9 @@
|
||||
|
||||
#include "chanalyzerng.h"
|
||||
|
||||
ChannelAnalyzerNGGUI* ChannelAnalyzerNGGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
ChannelAnalyzerNGGUI* ChannelAnalyzerNGGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
ChannelAnalyzerNGGUI* gui = new ChannelAnalyzerNGGUI(pluginAPI, deviceUISet);
|
||||
ChannelAnalyzerNGGUI* gui = new ChannelAnalyzerNGGUI(pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -349,7 +349,7 @@ void ChannelAnalyzerNGGUI::onMenuDoubleClicked()
|
||||
}
|
||||
}
|
||||
|
||||
ChannelAnalyzerNGGUI::ChannelAnalyzerNGGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
ChannelAnalyzerNGGUI::ChannelAnalyzerNGGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::ChannelAnalyzerNGGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
@ -369,13 +369,9 @@ ChannelAnalyzerNGGUI::ChannelAnalyzerNGGUI(PluginAPI* pluginAPI, DeviceUISet *de
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_scopeVis = new ScopeVisNG(ui->glScope);
|
||||
m_spectrumScopeComboVis = new SpectrumScopeNGComboVis(m_spectrumVis, m_scopeVis);
|
||||
m_channelAnalyzer = new ChannelAnalyzerNG(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_channelAnalyzer = (ChannelAnalyzerNG*) rxChannel; //new ChannelAnalyzerNG(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_channelAnalyzer->setSampleSink(m_spectrumScopeComboVis);
|
||||
m_channelAnalyzer->setMessageQueueToGUI(getInputMessageQueue());
|
||||
// m_channelizer = new DownChannelizer(m_channelAnalyzer);
|
||||
// m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
// connect(m_channelizer, SIGNAL(inputSampleRateChanged()), this, SLOT(channelizerInputSampleRateChanged()));
|
||||
// m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
|
||||
ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
|
||||
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
@ -396,7 +392,6 @@ ChannelAnalyzerNGGUI::ChannelAnalyzerNGGUI(PluginAPI* pluginAPI, DeviceUISet *de
|
||||
ui->glScope->connectTimer(MainWindow::getInstance()->getMasterTimer());
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
|
||||
//m_channelMarker = new ChannelMarker(this);
|
||||
m_channelMarker.setColor(Qt::gray);
|
||||
m_channelMarker.setBandwidth(m_rate);
|
||||
m_channelMarker.setSidebands(ChannelMarker::usb);
|
||||
@ -421,14 +416,10 @@ ChannelAnalyzerNGGUI::ChannelAnalyzerNGGUI(PluginAPI* pluginAPI, DeviceUISet *de
|
||||
ChannelAnalyzerNGGUI::~ChannelAnalyzerNGGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
// m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
||||
// delete m_threadedChannelizer;
|
||||
// delete m_channelizer;
|
||||
delete m_channelAnalyzer;
|
||||
delete m_channelAnalyzer; // TODO: check this: when the GUI closes it has to delete the demodulator
|
||||
delete m_spectrumVis;
|
||||
delete m_scopeVis;
|
||||
delete m_spectrumScopeComboVis;
|
||||
//delete m_channelMarker;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class BasebandSampleSink;
|
||||
class ThreadedBasebandSampleSink;
|
||||
class DownChannelizer;
|
||||
class ChannelAnalyzerNG;
|
||||
@ -41,7 +41,7 @@ class ChannelAnalyzerNGGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static ChannelAnalyzerNGGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
static ChannelAnalyzerNGGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -89,7 +89,7 @@ private:
|
||||
ScopeVisNG* m_scopeVis;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit ChannelAnalyzerNGGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
explicit ChannelAnalyzerNGGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
virtual ~ChannelAnalyzerNGGUI();
|
||||
|
||||
int getRequestedChannelSampleRate();
|
||||
|
@ -49,11 +49,11 @@ void ChannelAnalyzerNGPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(ChannelAnalyzerNG::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* ChannelAnalyzerNGPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
PluginInstanceGUI* ChannelAnalyzerNGPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
if(channelName == ChannelAnalyzerNG::m_channelID)
|
||||
{
|
||||
ChannelAnalyzerNGGUI* gui = ChannelAnalyzerNGGUI::create(m_pluginAPI, deviceUISet);
|
||||
ChannelAnalyzerNGGUI* gui = ChannelAnalyzerNGGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
private:
|
||||
|
@ -34,15 +34,15 @@
|
||||
|
||||
#include "amdemod.h"
|
||||
|
||||
AMDemodGUI* AMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
AMDemodGUI* AMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
AMDemodGUI* gui = new AMDemodGUI(pluginAPI, deviceUISet);
|
||||
AMDemodGUI* gui = new AMDemodGUI(pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
}
|
||||
|
||||
void AMDemodGUI::destroy()
|
||||
{
|
||||
delete this; // TODO: is this really useful?
|
||||
delete this;
|
||||
}
|
||||
|
||||
void AMDemodGUI::setName(const QString& name)
|
||||
@ -168,7 +168,7 @@ void AMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::AMDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
@ -183,7 +183,7 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget*
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||
|
||||
m_amDemod = new AMDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_amDemod = (AMDemod*) rxChannel; //new AMDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); // 50 ms
|
||||
|
||||
@ -215,7 +215,7 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget*
|
||||
AMDemodGUI::~AMDemodGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_amDemod;
|
||||
delete m_amDemod; // TODO: check this: when the GUI closes it has to delete the demodulator
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@ class DeviceUISet;
|
||||
class ThreadedBasebandSampleSink;
|
||||
class DownChannelizer;
|
||||
class AMDemod;
|
||||
class BasebandSampleSink;
|
||||
|
||||
namespace Ui {
|
||||
class AMDemodGUI;
|
||||
@ -23,7 +24,7 @@ class AMDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static AMDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
static AMDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -65,7 +66,7 @@ private:
|
||||
uint32_t m_tickCount;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
explicit AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
virtual ~AMDemodGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -34,11 +34,11 @@ void AMDemodPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(AMDemod::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
if(channelName == AMDemod::m_channelID)
|
||||
{
|
||||
AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
private:
|
||||
|
@ -40,6 +40,7 @@ const int ATVDemod::m_ssbFftLen = 1024;
|
||||
|
||||
ATVDemod::ATVDemod(DeviceSourceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_scopeSink(0),
|
||||
m_registeredATVScreen(0),
|
||||
m_intNumberSamplePerTop(0),
|
||||
m_intImageIndex(0),
|
||||
|
@ -37,9 +37,10 @@
|
||||
#include "atvdemod.h"
|
||||
|
||||
ATVDemodGUI* ATVDemodGUI::create(PluginAPI* objPluginAPI,
|
||||
DeviceUISet *deviceUISet)
|
||||
DeviceUISet *deviceUISet,
|
||||
BasebandSampleSink *rxChannel)
|
||||
{
|
||||
ATVDemodGUI* gui = new ATVDemodGUI(objPluginAPI, deviceUISet);
|
||||
ATVDemodGUI* gui = new ATVDemodGUI(objPluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -270,8 +271,7 @@ void ATVDemodGUI::onMenuDoubleClicked()
|
||||
}
|
||||
}
|
||||
|
||||
ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet,
|
||||
QWidget* objParent) :
|
||||
ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* objParent) :
|
||||
RollupWidget(objParent),
|
||||
ui(new Ui::ATVDemodGUI),
|
||||
m_pluginAPI(objPluginAPI),
|
||||
@ -289,7 +289,7 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet,
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_scopeVis = new ScopeVisNG(ui->glScope);
|
||||
m_atvDemod = new ATVDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_atvDemod = (ATVDemod*) rxChannel; //new ATVDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_atvDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
m_atvDemod->setScopeSink(m_scopeVis);
|
||||
m_atvDemod->setATVScreen(ui->screenTV);
|
||||
@ -344,7 +344,7 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet,
|
||||
ATVDemodGUI::~ATVDemodGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_atvDemod;
|
||||
delete m_atvDemod; // TODO: check this: when the GUI closes it has to delete the demodulator
|
||||
delete m_scopeVis;
|
||||
delete ui;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class BasebandSampleSink;
|
||||
class ATVDemod;
|
||||
class ScopeVisNG;
|
||||
|
||||
@ -40,7 +40,7 @@ class ATVDemodGUI : public RollupWidget, public PluginInstanceGUI
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static ATVDemodGUI* create(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet);
|
||||
static ATVDemodGUI* create(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& strName);
|
||||
@ -103,7 +103,7 @@ private:
|
||||
int m_inputSampleRate;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, QWidget* objParent = 0);
|
||||
explicit ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* objParent = 0);
|
||||
virtual ~ATVDemodGUI();
|
||||
|
||||
void blockApplySettings(bool blnBlock);
|
||||
|
@ -54,11 +54,11 @@ void ATVDemodPlugin::initPlugin(PluginAPI* ptrPluginAPI)
|
||||
m_ptrPluginAPI->registerRxChannel(ATVDemod::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* ATVDemodPlugin::createRxChannelGUI(const QString& strChannelName, DeviceUISet *deviceUISet)
|
||||
PluginInstanceGUI* ATVDemodPlugin::createRxChannelGUI(const QString& strChannelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
if(strChannelName == ATVDemod::m_channelID)
|
||||
{
|
||||
ATVDemodGUI* ptrGui = ATVDemodGUI::create(m_ptrPluginAPI, deviceUISet);
|
||||
ATVDemodGUI* ptrGui = ATVDemodGUI::create(m_ptrPluginAPI, deviceUISet, rxChannel);
|
||||
return ptrGui;
|
||||
}
|
||||
else
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* ptrPluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& strChannelName, DeviceUISet *deviceUISet);
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& strChannelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
private:
|
||||
|
@ -71,7 +71,6 @@ BFMDemod::BFMDemod(DeviceSourceAPI *deviceAPI) :
|
||||
|
||||
m_rfFilter = new fftfilt(-50000.0 / 384000.0, 50000.0 / 384000.0, filtFftLen);
|
||||
|
||||
connect(m_channelizer, SIGNAL(inputSampleRateChanged()), this, SLOT(channelSampleRateChanged()));
|
||||
|
||||
m_deemphasisFilterX.configure(default_deemphasis * m_settings.m_audioSampleRate * 1.0e-6);
|
||||
m_deemphasisFilterY.configure(default_deemphasis * m_settings.m_audioSampleRate * 1.0e-6);
|
||||
@ -87,6 +86,8 @@ BFMDemod::BFMDemod(DeviceSourceAPI *deviceAPI) :
|
||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
|
||||
connect(m_channelizer, SIGNAL(inputSampleRateChanged()), this, SLOT(channelSampleRateChanged()));
|
||||
|
||||
applySettings(m_settings, true);
|
||||
}
|
||||
|
||||
|
@ -43,9 +43,9 @@
|
||||
#include "rdstmc.h"
|
||||
#include "ui_bfmdemodgui.h"
|
||||
|
||||
BFMDemodGUI* BFMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUIset)
|
||||
BFMDemodGUI* BFMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUIset, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
BFMDemodGUI* gui = new BFMDemodGUI(pluginAPI, deviceUIset);
|
||||
BFMDemodGUI* gui = new BFMDemodGUI(pluginAPI, deviceUIset, rxChannel);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -314,7 +314,7 @@ void BFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||
}
|
||||
}
|
||||
|
||||
BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::BFMDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
@ -336,7 +336,7 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
|
||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_bfmDemod = new BFMDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_bfmDemod = (BFMDemod*) rxChannel; //new BFMDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_bfmDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
m_bfmDemod->setSampleSink(m_spectrumVis);
|
||||
|
||||
@ -382,7 +382,7 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
|
||||
BFMDemodGUI::~BFMDemodGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_bfmDemod;
|
||||
delete m_bfmDemod; // TODO: check this: when the GUI closes it has to delete the demodulator
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,7 @@ class ThreadedBasebandSampleSink;
|
||||
class DownChannelizer;
|
||||
class SpectrumVis;
|
||||
class BFMDemod;
|
||||
class BasebandSampleSink;
|
||||
|
||||
namespace Ui {
|
||||
class BFMDemodGUI;
|
||||
@ -42,7 +43,7 @@ class BFMDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static BFMDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceAPI);
|
||||
static BFMDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceAPI, BasebandSampleSink *rxChannel);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -94,7 +95,7 @@ private:
|
||||
std::vector<unsigned int> m_g14ComboIndex;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
explicit BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
virtual ~BFMDemodGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -51,11 +51,11 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(BFMDemod::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* BFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
PluginInstanceGUI* BFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
if(channelName == BFMDemod::m_channelID)
|
||||
{
|
||||
BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
private:
|
||||
|
@ -38,9 +38,9 @@
|
||||
#include "dsddemodbaudrates.h"
|
||||
#include "dsddemod.h"
|
||||
|
||||
DSDDemodGUI* DSDDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
DSDDemodGUI* DSDDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
DSDDemodGUI* gui = new DSDDemodGUI(pluginAPI, deviceUISet);
|
||||
DSDDemodGUI* gui = new DSDDemodGUI(pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ void DSDDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::DSDDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
@ -252,7 +252,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||
|
||||
m_scopeVis = new ScopeVis(ui->glScope);
|
||||
m_dsdDemod = new DSDDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_dsdDemod = (DSDDemod*) rxChannel; //new DSDDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_dsdDemod->setScopeSink(m_scopeVis);
|
||||
m_dsdDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
@ -297,7 +297,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
|
||||
DSDDemodGUI::~DSDDemodGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_dsdDemod;
|
||||
delete m_dsdDemod; // TODO: check this: when the GUI closes it has to delete the demodulator
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class BasebandSampleSink;
|
||||
class ScopeVis;
|
||||
class DSDDemod;
|
||||
|
||||
@ -43,7 +43,7 @@ class DSDDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static DSDDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
static DSDDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -116,7 +116,7 @@ private:
|
||||
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
explicit DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
virtual ~DSDDemodGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = {
|
||||
QString("DSD Demodulator"),
|
||||
QString("3.8.0"),
|
||||
QString("3.8.2"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -51,11 +51,11 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(DSDDemod::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
if(channelName == DSDDemod::m_channelID)
|
||||
{
|
||||
DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
private:
|
||||
|
@ -16,9 +16,9 @@
|
||||
#include "lorademod.h"
|
||||
#include "lorademodgui.h"
|
||||
|
||||
LoRaDemodGUI* LoRaDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
LoRaDemodGUI* LoRaDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
LoRaDemodGUI* gui = new LoRaDemodGUI(pluginAPI, deviceUISet);
|
||||
LoRaDemodGUI* gui = new LoRaDemodGUI(pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ void LoRaDemodGUI::onMenuDoubleClicked()
|
||||
}
|
||||
}
|
||||
|
||||
LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::LoRaDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
@ -134,7 +134,7 @@ LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidg
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_LoRaDemod = new LoRaDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_LoRaDemod = (LoRaDemod*) rxChannel; //new LoRaDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_LoRaDemod->setSpectrumSink(m_spectrumVis);
|
||||
|
||||
ui->glSpectrum->setCenterFrequency(16000);
|
||||
@ -167,7 +167,7 @@ LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidg
|
||||
LoRaDemodGUI::~LoRaDemodGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_LoRaDemod;
|
||||
delete m_LoRaDemod; // TODO: check this: when the GUI closes it has to delete the demodulator
|
||||
delete m_spectrumVis;
|
||||
delete ui;
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ class PluginAPI;
|
||||
class DeviceUISet;
|
||||
class LoRaDemod;
|
||||
class SpectrumVis;
|
||||
class BasebandSampleSink;
|
||||
|
||||
namespace Ui {
|
||||
class LoRaDemodGUI;
|
||||
@ -21,7 +22,7 @@ class LoRaDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static LoRaDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceAPI);
|
||||
static LoRaDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceAPI, BasebandSampleSink *rxChannel);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -55,7 +56,7 @@ private:
|
||||
SpectrumVis* m_spectrumVis;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = NULL);
|
||||
explicit LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
virtual ~LoRaDemodGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -33,11 +33,11 @@ void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(LoRaDemod::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* LoRaPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
PluginInstanceGUI* LoRaPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
if(channelName == LoRaDemod::m_channelID)
|
||||
{
|
||||
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
private:
|
||||
|
@ -16,9 +16,9 @@
|
||||
#include "mainwindow.h"
|
||||
#include "nfmdemod.h"
|
||||
|
||||
NFMDemodGUI* NFMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
NFMDemodGUI* NFMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
NFMDemodGUI* gui = new NFMDemodGUI(pluginAPI, deviceUISet);
|
||||
NFMDemodGUI* gui = new NFMDemodGUI(pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ void NFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::NFMDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
@ -237,7 +237,7 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||
|
||||
m_nfmDemod = new NFMDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_nfmDemod = (NFMDemod*) rxChannel; //new NFMDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_nfmDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
@ -291,7 +291,7 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
|
||||
NFMDemodGUI::~NFMDemodGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_nfmDemod;
|
||||
delete m_nfmDemod; // TODO: check this: when the GUI closes it has to delete the demodulator
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class BasebandSampleSink;
|
||||
class NFMDemod;
|
||||
|
||||
namespace Ui {
|
||||
@ -23,7 +23,7 @@ class NFMDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static NFMDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
static NFMDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -70,7 +70,7 @@ private:
|
||||
uint32_t m_tickCount;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
explicit NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
virtual ~NFMDemodGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -33,10 +33,10 @@ void NFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(NFMDemod::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* NFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
PluginInstanceGUI* NFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
if(channelName == NFMDemod::m_channelID) {
|
||||
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
private:
|
||||
|
@ -17,9 +17,9 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ssbdemod.h"
|
||||
|
||||
SSBDemodGUI* SSBDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
SSBDemodGUI* SSBDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
SSBDemodGUI* gui = new SSBDemodGUI(pluginAPI, deviceUISet);
|
||||
SSBDemodGUI* gui = new SSBDemodGUI(pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ void SSBDemodGUI::onMenuDoubleClicked()
|
||||
}
|
||||
}
|
||||
|
||||
SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::SSBDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
@ -219,7 +219,7 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_ssbDemod = new SSBDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_ssbDemod = (SSBDemod*) rxChannel; //new SSBDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_ssbDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
m_ssbDemod->setSampleSink(m_spectrumVis);
|
||||
|
||||
@ -264,7 +264,7 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
|
||||
SSBDemodGUI::~SSBDemodGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_ssbDemod;
|
||||
delete m_ssbDemod; // TODO: check this: when the GUI closes it has to delete the demodulator
|
||||
delete m_spectrumVis;
|
||||
delete ui;
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ class DeviceUISet;
|
||||
class AudioFifo;
|
||||
class SSBDemod;
|
||||
class SpectrumVis;
|
||||
class BasebandSampleSink;
|
||||
|
||||
namespace Ui {
|
||||
class SSBDemodGUI;
|
||||
@ -23,7 +24,7 @@ class SSBDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static SSBDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
static SSBDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -76,7 +77,7 @@ private:
|
||||
SpectrumVis* m_spectrumVis;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet* deviceUISet, QWidget* parent = 0);
|
||||
explicit SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet* deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
virtual ~SSBDemodGUI();
|
||||
|
||||
bool blockApplySettings(bool block);
|
||||
|
@ -34,11 +34,11 @@ void SSBPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(SSBDemod::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* SSBPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
PluginInstanceGUI* SSBPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
if(channelName == SSBDemod::m_channelID)
|
||||
{
|
||||
SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
private:
|
||||
|
@ -18,9 +18,9 @@
|
||||
|
||||
#include "wfmdemod.h"
|
||||
|
||||
WFMDemodGUI* WFMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
WFMDemodGUI* WFMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
WFMDemodGUI* gui = new WFMDemodGUI(pluginAPI, deviceUISet);
|
||||
WFMDemodGUI* gui = new WFMDemodGUI(pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ void WFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::WFMDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
@ -156,7 +156,7 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||
|
||||
m_wfmDemod = new WFMDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_wfmDemod = (WFMDemod*) rxChannel; //new WFMDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
|
||||
@ -196,7 +196,7 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
|
||||
WFMDemodGUI::~WFMDemodGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_wfmDemod;
|
||||
delete m_wfmDemod; // TODO: check this: when the GUI closes it has to delete the demodulator
|
||||
//delete m_channelMarker;
|
||||
delete ui;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class BasebandSampleSink;
|
||||
class WFMDemod;
|
||||
|
||||
namespace Ui {
|
||||
@ -22,7 +22,7 @@ class WFMDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static WFMDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
static WFMDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -63,7 +63,7 @@ private:
|
||||
MovingAverage<double> m_channelPowerDbAvg;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
explicit WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
virtual ~WFMDemodGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -34,11 +34,11 @@ void WFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(WFMDemod::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* WFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
PluginInstanceGUI* WFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
if(channelName == WFMDemod::m_channelID)
|
||||
{
|
||||
WFMDemodGUI* gui = WFMDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
WFMDemodGUI* gui = WFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
private:
|
||||
|
@ -12,9 +12,9 @@
|
||||
#include "mainwindow.h"
|
||||
#include "tcpsrc.h"
|
||||
|
||||
TCPSrcGUI* TCPSrcGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
TCPSrcGUI* TCPSrcGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
TCPSrcGUI* gui = new TCPSrcGUI(pluginAPI, deviceUISet);
|
||||
TCPSrcGUI* gui = new TCPSrcGUI(pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -120,7 +120,7 @@ void TCPSrcGUI::tick()
|
||||
ui->channelPower->setText(QString::number(m_channelPowerDbAvg.average(), 'f', 1));
|
||||
}
|
||||
|
||||
TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::TCPSrcGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
@ -139,7 +139,7 @@ TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* pa
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_tcpSrc = new TCPSrc(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_tcpSrc = (TCPSrc*) rxChannel; //new TCPSrc(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_tcpSrc->setSpectrum(m_spectrumVis);
|
||||
|
||||
ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
|
||||
@ -178,7 +178,7 @@ TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* pa
|
||||
TCPSrcGUI::~TCPSrcGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_tcpSrc;
|
||||
delete m_tcpSrc; // TODO: check this: when the GUI closes it has to delete the demodulator
|
||||
delete m_spectrumVis;
|
||||
delete ui;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class TCPSrcGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static TCPSrcGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
static TCPSrcGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -75,7 +75,7 @@ private:
|
||||
SpectrumVis* m_spectrumVis;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit TCPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
explicit TCPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
virtual ~TCPSrcGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -34,11 +34,11 @@ void TCPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(TCPSrc::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* TCPSrcPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
PluginInstanceGUI* TCPSrcPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
if(channelName == TCPSrc::m_channelID)
|
||||
{
|
||||
TCPSrcGUI* gui = TCPSrcGUI::create(m_pluginAPI, deviceUISet);
|
||||
TCPSrcGUI* gui = TCPSrcGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
// deviceAPI->registerChannelInstance("sdrangel.channel.tcpsrc", gui);
|
||||
// m_pluginAPI->addChannelRollup(gui);
|
||||
return gui;
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
private:
|
||||
|
@ -30,9 +30,9 @@
|
||||
|
||||
#include "udpsrc.h"
|
||||
|
||||
UDPSrcGUI* UDPSrcGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
UDPSrcGUI* UDPSrcGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
UDPSrcGUI* gui = new UDPSrcGUI(pluginAPI, deviceUISet);
|
||||
UDPSrcGUI* gui = new UDPSrcGUI(pluginAPI, deviceUISet, rxChannel);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ void UDPSrcGUI::tick()
|
||||
m_tickCount++;
|
||||
}
|
||||
|
||||
UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::UDPSrcGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
@ -149,7 +149,7 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* pa
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_udpSrc = new UDPSrc(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_udpSrc = (UDPSrc*) rxChannel; //new UDPSrc(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_udpSrc->setSpectrum(m_spectrumVis);
|
||||
|
||||
ui->fmDeviation->setEnabled(false);
|
||||
@ -197,7 +197,7 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* pa
|
||||
UDPSrcGUI::~UDPSrcGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_udpSrc;
|
||||
delete m_udpSrc; // TODO: check this: when the GUI closes it has to delete the demodulator
|
||||
delete m_spectrumVis;
|
||||
delete ui;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class UDPSrcGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static UDPSrcGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
static UDPSrcGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -93,7 +93,7 @@ private:
|
||||
// RF path
|
||||
SpectrumVis* m_spectrumVis;
|
||||
|
||||
explicit UDPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
explicit UDPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
virtual ~UDPSrcGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -51,11 +51,11 @@ void UDPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(UDPSrc::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* UDPSrcPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
PluginInstanceGUI* UDPSrcPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
if(channelName == UDPSrc::m_channelID)
|
||||
{
|
||||
UDPSrcGUI* gui = UDPSrcGUI::create(m_pluginAPI, deviceUISet);
|
||||
UDPSrcGUI* gui = UDPSrcGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
||||
// m_pluginAPI->addChannelRollup(gui);
|
||||
return gui;
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
private:
|
||||
|
@ -75,7 +75,8 @@ public:
|
||||
|
||||
virtual PluginInstanceGUI* createRxChannelGUI(
|
||||
const QString& channelName __attribute__((unused)),
|
||||
DeviceUISet *deviceUISet __attribute__((unused)) )
|
||||
DeviceUISet *deviceUISet __attribute__((unused)),
|
||||
BasebandSampleSink *rxChannel __attribute__((unused)))
|
||||
{ return 0; }
|
||||
|
||||
virtual BasebandSampleSink* createRxChannel(
|
||||
|
@ -177,12 +177,14 @@ void PluginManager::listRxChannels(QList<QString>& list)
|
||||
}
|
||||
}
|
||||
|
||||
void PluginManager::createRxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet)
|
||||
void PluginManager::createRxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet, DeviceSourceAPI *deviceAPI)
|
||||
{
|
||||
if (channelPluginIndex < m_rxChannelRegistrations.size())
|
||||
{
|
||||
PluginInterface *pluginInterface = m_rxChannelRegistrations[channelPluginIndex].m_plugin;
|
||||
pluginInterface->createRxChannelGUI(m_rxChannelRegistrations[channelPluginIndex].m_channelId, deviceUISet);
|
||||
BasebandSampleSink *rxChannel = pluginInterface->createRxChannel(
|
||||
m_rxChannelRegistrations[channelPluginIndex].m_channelId, deviceAPI);
|
||||
pluginInterface->createRxChannelGUI(m_rxChannelRegistrations[channelPluginIndex].m_channelId, deviceUISet, rxChannel);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
PluginAPI::ChannelRegistrations *getRxChannelRegistrations() { return &m_rxChannelRegistrations; }
|
||||
PluginAPI::ChannelRegistrations *getTxChannelRegistrations() { return &m_txChannelRegistrations; }
|
||||
|
||||
void createRxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet);
|
||||
void createRxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet, DeviceSourceAPI *deviceAPI);
|
||||
void listRxChannels(QList<QString>& list);
|
||||
|
||||
void createTxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet, DeviceSinkAPI *deviceAPI);
|
||||
|
@ -176,11 +176,12 @@ void DeviceUISet::loadRxChannelSettings(const Preset *preset, PluginAPI *pluginA
|
||||
if((*channelRegistrations)[i].m_channelId == channelConfig.m_channel)
|
||||
{
|
||||
qDebug("DeviceUISet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channel));
|
||||
BasebandSampleSink *rxChannel = (*channelRegistrations)[i].m_plugin->createRxChannel(
|
||||
channelConfig.m_channel, m_deviceSourceAPI);
|
||||
PluginInstanceGUI *rxChannelGUI = (*channelRegistrations)[i].m_plugin->createRxChannelGUI(
|
||||
channelConfig.m_channel, this, rxChannel);
|
||||
reg = ChannelInstanceRegistration(
|
||||
channelConfig.m_channel,
|
||||
(*channelRegistrations)[i].
|
||||
m_plugin->createRxChannelGUI(channelConfig.m_channel, this)
|
||||
);
|
||||
channelConfig.m_channel, rxChannelGUI);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -274,7 +275,6 @@ void DeviceUISet::loadTxChannelSettings(const Preset *preset, PluginAPI *pluginA
|
||||
if((*channelRegistrations)[i].m_channelId == channelConfig.m_channel)
|
||||
{
|
||||
qDebug("DeviceUISet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channel));
|
||||
// TODO: create modulator core
|
||||
BasebandSampleSource *txChannel = (*channelRegistrations)[i].m_plugin->createTxChannel(
|
||||
channelConfig.m_channel, m_deviceSinkAPI);
|
||||
PluginInstanceGUI *txChannelGUI = (*channelRegistrations)[i].m_plugin->createTxChannelGUI(
|
||||
|
@ -1060,7 +1060,7 @@ void MainWindow::on_channel_addClicked(bool checked __attribute__((unused)))
|
||||
|
||||
if (deviceUI->m_deviceSourceEngine) // source device => Rx channels
|
||||
{
|
||||
m_pluginManager->createRxChannelInstance(deviceUI->m_samplingDeviceControl->getChannelSelector()->currentIndex(), deviceUI);
|
||||
m_pluginManager->createRxChannelInstance(deviceUI->m_samplingDeviceControl->getChannelSelector()->currentIndex(), deviceUI, deviceUI->m_deviceSourceAPI);
|
||||
}
|
||||
else if (deviceUI->m_deviceSinkEngine) // sink device => Tx channels
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user