mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-05 15:34:57 -04:00
Added mod constructor interface in the plugin API. Created method in all Tx channel plugins
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "plugin/pluginapi.h"
|
||||
|
||||
#include "ssbmodgui.h"
|
||||
#include "ssbmod.h"
|
||||
#include "ssbmodplugin.h"
|
||||
|
||||
const PluginDescriptor SSBModPlugin::m_pluginDescriptor = {
|
||||
@@ -46,12 +47,12 @@ void SSBModPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI = pluginAPI;
|
||||
|
||||
// register SSB modulator
|
||||
m_pluginAPI->registerTxChannel(SSBModGUI::m_channelID, this);
|
||||
m_pluginAPI->registerTxChannel(SSBMod::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* SSBModPlugin::createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == SSBModGUI::m_channelID)
|
||||
if(channelName == SSBMod::m_channelID)
|
||||
{
|
||||
SSBModGUI* gui = SSBModGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
@@ -59,3 +60,14 @@ PluginInstanceGUI* SSBModPlugin::createTxChannelGUI(const QString& channelName,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
BasebandSampleSource* SSBModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
||||
{
|
||||
if(channelName == SSBMod::m_channelID)
|
||||
{
|
||||
SSBMod* source = new SSBMod(deviceAPI);
|
||||
return source;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user