1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-25 11:34:09 -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
@@ -27,14 +27,15 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI = pluginAPI;
// register demodulator
m_pluginAPI->registerChannel("org.f4exb.sdrangelove.channel.chanalyzer", this);
m_pluginAPI->registerChannel(ChannelAnalyzerGUI::m_channelID, this);
}
PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
{
if(channelName == "org.f4exb.sdrangelove.channel.chanalyzer") {
if(channelName == ChannelAnalyzerGUI::m_channelID)
{
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI);
m_pluginAPI->registerChannelInstance("org.f4exb.sdrangelove.channel.chanalyzer", gui);
// deviceAPI->registerChannelInstance("org.f4exb.sdrangelove.channel.chanalyzer", gui);
// m_pluginAPI->addChannelRollup(gui);
return gui;
} else {
@@ -45,6 +46,6 @@ PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName, Devi
void ChannelAnalyzerPlugin::createInstanceChannelAnalyzer(DeviceAPI *deviceAPI)
{
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI);
m_pluginAPI->registerChannelInstance("org.f4exb.sdrangelove.channel.chanalyzer", gui);
// deviceAPI->registerChannelInstance("org.f4exb.sdrangelove.channel.chanalyzer", gui);
// m_pluginAPI->addChannelRollup(gui);
}