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:
@@ -27,14 +27,15 @@ void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI = pluginAPI;
|
||||
|
||||
// register demodulator
|
||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.lora", this);
|
||||
m_pluginAPI->registerChannel(LoRaDemodGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginGUI* LoRaPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
||||
{
|
||||
if(channelName == "de.maintech.sdrangelove.channel.lora") {
|
||||
if(channelName == LoRaDemodGUI::m_channelID)
|
||||
{
|
||||
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.lora", gui);
|
||||
// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.lora", gui);
|
||||
// m_pluginAPI->addChannelRollup(gui);
|
||||
return gui;
|
||||
} else {
|
||||
@@ -45,6 +46,6 @@ PluginGUI* LoRaPlugin::createChannel(const QString& channelName, DeviceAPI *devi
|
||||
void LoRaPlugin::createInstanceLoRa(DeviceAPI *deviceAPI)
|
||||
{
|
||||
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.lora", gui);
|
||||
// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.lora", gui);
|
||||
// m_pluginAPI->addChannelRollup(gui);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user