mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-03 06:24:48 -04:00
Replace separate create channel methods (BS and CS): common plugins
This commit is contained in:
@@ -54,6 +54,22 @@ void FreqTrackerPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(FreqTracker::m_channelIdURI, FreqTracker::m_channelId, this);
|
||||
}
|
||||
|
||||
void FreqTrackerPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const
|
||||
{
|
||||
if (bs || cs)
|
||||
{
|
||||
FreqTracker *instance = new FreqTracker(deviceAPI);
|
||||
|
||||
if (bs) {
|
||||
*bs = instance;
|
||||
}
|
||||
|
||||
if (cs) {
|
||||
*cs = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* FreqTrackerPlugin::createRxChannelGUI(
|
||||
DeviceUISet *deviceUISet,
|
||||
@@ -68,16 +84,6 @@ PluginInstanceGUI* FreqTrackerPlugin::createRxChannelGUI(DeviceUISet *deviceUISe
|
||||
}
|
||||
#endif
|
||||
|
||||
BasebandSampleSink* FreqTrackerPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new FreqTracker(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelAPI* FreqTrackerPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new FreqTracker(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelWebAPIAdapter* FreqTrackerPlugin::createChannelWebAPIAdapter() const
|
||||
{
|
||||
return new FreqTrackerWebAPIAdapter();
|
||||
|
||||
Reference in New Issue
Block a user