1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-09 01:14:58 -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
@@ -45,14 +45,15 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register DSD demodulator
m_pluginAPI->registerChannel("sdrangel.channel.dsddemod", this);
m_pluginAPI->registerChannel(DSDDemodGUI::m_channelID, this);
}
PluginGUI* DSDDemodPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
{
if(channelName == "sdrangel.channel.dsddemod") {
if(channelName == DSDDemodGUI::m_channelID)
{
DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceAPI);
m_pluginAPI->registerChannelInstance("sdrangel.channel.dsddemod", gui);
// deviceAPI->registerChannelInstance("sdrangel.channel.dsddemod", gui);
// m_pluginAPI->addChannelRollup(gui);
return gui;
} else {
@@ -63,6 +64,6 @@ PluginGUI* DSDDemodPlugin::createChannel(const QString& channelName, DeviceAPI *
void DSDDemodPlugin::createInstanceDSDDemod(DeviceAPI *deviceAPI)
{
DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceAPI);
m_pluginAPI->registerChannelInstance("sdrangel.channel.dsddemod", gui);
// deviceAPI->registerChannelInstance("sdrangel.channel.dsddemod", gui);
// m_pluginAPI->addChannelRollup(gui);
}