mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-05 23:45:00 -04:00
Added mod constructor interface in the plugin API. Created method in all Tx channel plugins
This commit is contained in:
@@ -19,11 +19,12 @@
|
||||
#include "plugin/pluginapi.h"
|
||||
|
||||
#include "ammodgui.h"
|
||||
#include "ammod.h"
|
||||
#include "ammodplugin.h"
|
||||
|
||||
const PluginDescriptor AMModPlugin::m_pluginDescriptor = {
|
||||
QString("AM Modulator"),
|
||||
QString("3.8.0"),
|
||||
QString("3.8.2"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@@ -46,12 +47,12 @@ void AMModPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI = pluginAPI;
|
||||
|
||||
// register AM modulator
|
||||
m_pluginAPI->registerTxChannel(AMModGUI::m_channelID, this);
|
||||
m_pluginAPI->registerTxChannel(AMMod::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* AMModPlugin::createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == AMModGUI::m_channelID)
|
||||
if(channelName == AMMod::m_channelID)
|
||||
{
|
||||
AMModGUI* gui = AMModGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
@@ -59,3 +60,14 @@ PluginInstanceGUI* AMModPlugin::createTxChannelGUI(const QString& channelName, D
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
BasebandSampleSource* AMModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
||||
{
|
||||
if(channelName == AMMod::m_channelID)
|
||||
{
|
||||
AMMod* source = new AMMod(deviceAPI);
|
||||
return source;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user