kopia lustrzana https://github.com/f4exb/sdrangel
50 wiersze
1.0 KiB
C++
50 wiersze
1.0 KiB
C++
#include <QtPlugin>
|
|
#include "plugin/pluginapi.h"
|
|
|
|
#include "loraplugin.h"
|
|
#include "lorademodgui.h"
|
|
|
|
const PluginDescriptor LoRaPlugin::m_pluginDescriptor = {
|
|
QString("LoRa Demodulator"),
|
|
QString("3.8.0"),
|
|
QString("(c) 2015 John Greb"),
|
|
QString("http://www.maintech.de"),
|
|
true,
|
|
QString("github.com/hexameron/rtl-sdrangelove")
|
|
};
|
|
|
|
LoRaPlugin::LoRaPlugin(QObject* parent) :
|
|
QObject(parent),
|
|
m_pluginAPI(0)
|
|
{
|
|
}
|
|
|
|
const PluginDescriptor& LoRaPlugin::getPluginDescriptor() const
|
|
{
|
|
return m_pluginDescriptor;
|
|
}
|
|
|
|
void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
|
|
{
|
|
m_pluginAPI = pluginAPI;
|
|
|
|
// register demodulator
|
|
m_pluginAPI->registerRxChannel(LoRaDemodGUI::m_channelID, this);
|
|
}
|
|
|
|
PluginInstanceGUI* LoRaPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
|
{
|
|
if(channelName == LoRaDemodGUI::m_channelID)
|
|
{
|
|
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceUISet);
|
|
return gui;
|
|
} else {
|
|
return NULL;
|
|
}
|
|
}
|
|
|
|
void LoRaPlugin::createInstanceLoRa(DeviceUISet *deviceUISet)
|
|
{
|
|
LoRaDemodGUI::create(m_pluginAPI, deviceUISet);
|
|
}
|