2015-01-10 19:12:58 -05:00
|
|
|
#include <QtPlugin>
|
|
|
|
#include "plugin/pluginapi.h"
|
2016-10-02 07:18:07 -04:00
|
|
|
|
2017-10-07 20:26:47 -04:00
|
|
|
#include "loraplugin.h"
|
|
|
|
#include "lorademodgui.h"
|
2015-01-10 19:12:58 -05:00
|
|
|
|
|
|
|
const PluginDescriptor LoRaPlugin::m_pluginDescriptor = {
|
|
|
|
QString("LoRa Demodulator"),
|
2017-11-05 19:39:44 -05:00
|
|
|
QString("3.8.2"),
|
2015-01-10 19:12:58 -05:00
|
|
|
QString("(c) 2015 John Greb"),
|
|
|
|
QString("http://www.maintech.de"),
|
|
|
|
true,
|
|
|
|
QString("github.com/hexameron/rtl-sdrangelove")
|
|
|
|
};
|
|
|
|
|
|
|
|
LoRaPlugin::LoRaPlugin(QObject* parent) :
|
2017-05-05 04:40:45 -04:00
|
|
|
QObject(parent),
|
|
|
|
m_pluginAPI(0)
|
2015-01-10 19:12:58 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
const PluginDescriptor& LoRaPlugin::getPluginDescriptor() const
|
|
|
|
{
|
|
|
|
return m_pluginDescriptor;
|
|
|
|
}
|
|
|
|
|
|
|
|
void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
|
|
|
|
{
|
|
|
|
m_pluginAPI = pluginAPI;
|
|
|
|
|
|
|
|
// register demodulator
|
2016-10-13 16:23:43 -04:00
|
|
|
m_pluginAPI->registerRxChannel(LoRaDemodGUI::m_channelID, this);
|
2015-01-10 19:12:58 -05:00
|
|
|
}
|
|
|
|
|
2017-10-31 03:24:05 -04:00
|
|
|
PluginInstanceGUI* LoRaPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
2015-01-10 19:12:58 -05:00
|
|
|
{
|
2016-05-16 13:37:53 -04:00
|
|
|
if(channelName == LoRaDemodGUI::m_channelID)
|
|
|
|
{
|
2017-10-31 03:24:05 -04:00
|
|
|
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceUISet);
|
2015-01-10 19:12:58 -05:00
|
|
|
return gui;
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-31 03:24:05 -04:00
|
|
|
void LoRaPlugin::createInstanceLoRa(DeviceUISet *deviceUISet)
|
2015-01-10 19:12:58 -05:00
|
|
|
{
|
2017-10-31 03:24:05 -04:00
|
|
|
LoRaDemodGUI::create(m_pluginAPI, deviceUISet);
|
2015-01-10 19:12:58 -05:00
|
|
|
}
|