1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-08 00:44:48 -04:00

Multi device support: use device API for channel registrations

This commit is contained in:
f4exb
2016-05-16 19:37:53 +02:00
parent e1e3df466f
commit 2f1c9eac6e
34 changed files with 155 additions and 82 deletions
+5 -4
View File
@@ -46,14 +46,15 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register BFM demodulator
m_pluginAPI->registerChannel("sdrangel.channel.bfm", this);
m_pluginAPI->registerChannel(BFMDemodGUI::m_channelID, this);
}
PluginGUI* BFMPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
{
if(channelName == "sdrangel.channel.bfm") {
if(channelName == BFMDemodGUI::m_channelID)
{
BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceAPI);
m_pluginAPI->registerChannelInstance("sdrangel.channel.bfm", gui);
// deviceAPI->registerChannelInstance("sdrangel.channel.bfm", gui);
// m_pluginAPI->addChannelRollup(gui);
return gui;
} else {
@@ -64,6 +65,6 @@ PluginGUI* BFMPlugin::createChannel(const QString& channelName, DeviceAPI *devic
void BFMPlugin::createInstanceBFM(DeviceAPI *deviceAPI)
{
BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceAPI);
m_pluginAPI->registerChannelInstance("sdrangel.channel.bfm", gui);
// deviceAPI->registerChannelInstance("sdrangel.channel.bfm", gui);
// m_pluginAPI->addChannelRollup(gui);
}