2016-10-02 11:18:07 +00:00
|
|
|
#include "../../channelrx/demodlora/loraplugin.h"
|
|
|
|
|
2015-01-11 00:12:58 +00:00
|
|
|
#include <QtPlugin>
|
|
|
|
#include "plugin/pluginapi.h"
|
2016-10-02 11:18:07 +00:00
|
|
|
|
|
|
|
#include "../../channelrx/demodlora/lorademodgui.h"
|
2015-01-11 00:12:58 +00:00
|
|
|
|
|
|
|
const PluginDescriptor LoRaPlugin::m_pluginDescriptor = {
|
|
|
|
QString("LoRa Demodulator"),
|
2016-05-17 13:29:28 +00:00
|
|
|
QString("2.0.0"),
|
2015-01-11 00:12:58 +00: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 08:40:45 +00:00
|
|
|
QObject(parent),
|
|
|
|
m_pluginAPI(0)
|
2015-01-11 00:12:58 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
const PluginDescriptor& LoRaPlugin::getPluginDescriptor() const
|
|
|
|
{
|
|
|
|
return m_pluginDescriptor;
|
|
|
|
}
|
|
|
|
|
|
|
|
void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
|
|
|
|
{
|
|
|
|
m_pluginAPI = pluginAPI;
|
|
|
|
|
|
|
|
// register demodulator
|
2016-10-13 20:23:43 +00:00
|
|
|
m_pluginAPI->registerRxChannel(LoRaDemodGUI::m_channelID, this);
|
2015-01-11 00:12:58 +00:00
|
|
|
}
|
|
|
|
|
2016-10-13 21:42:08 +00:00
|
|
|
PluginGUI* LoRaPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
|
2015-01-11 00:12:58 +00:00
|
|
|
{
|
2016-05-16 17:37:53 +00:00
|
|
|
if(channelName == LoRaDemodGUI::m_channelID)
|
|
|
|
{
|
2016-05-16 08:05:09 +00:00
|
|
|
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
|
2015-01-11 00:12:58 +00:00
|
|
|
return gui;
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-10-10 23:17:55 +00:00
|
|
|
void LoRaPlugin::createInstanceLoRa(DeviceSourceAPI *deviceAPI)
|
2015-01-11 00:12:58 +00:00
|
|
|
{
|
2017-05-25 18:13:34 +00:00
|
|
|
LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
|
2015-01-11 00:12:58 +00:00
|
|
|
}
|