1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-24 11:04:10 -04:00

Created demod constructor method in all Rx channel plugins

This commit is contained in:
f4exb
2017-11-08 14:23:49 +01:00
parent cef9d5d7bc
commit 4ad038ed9d
71 changed files with 2036 additions and 1887 deletions
+15 -2
View File
@@ -21,6 +21,7 @@
#include "plugin/pluginapi.h"
#include "bfmdemodgui.h"
#include "bfmdemod.h"
const PluginDescriptor BFMPlugin::m_pluginDescriptor = {
QString("Broadcast FM Demodulator"),
@@ -47,12 +48,12 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register BFM demodulator
m_pluginAPI->registerRxChannel(BFMDemodGUI::m_channelID, this);
m_pluginAPI->registerRxChannel(BFMDemod::m_channelID, this);
}
PluginInstanceGUI* BFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
{
if(channelName == BFMDemodGUI::m_channelID)
if(channelName == BFMDemod::m_channelID)
{
BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceUISet);
return gui;
@@ -60,3 +61,15 @@ PluginInstanceGUI* BFMPlugin::createRxChannelGUI(const QString& channelName, Dev
return 0;
}
}
BasebandSampleSink* BFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == BFMDemod::m_channelID)
{
BFMDemod* sink = new BFMDemod(deviceAPI);
return sink;
} else {
return 0;
}
}