1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-18 23:55:50 -05:00
sdrangel/plugins/channelrx/demodlora/loraplugin.cpp

50 lines
1.1 KiB
C++
Raw Normal View History

#include "../../channelrx/demodlora/loraplugin.h"
2015-01-10 19:12:58 -05:00
#include <QtPlugin>
#include "plugin/pluginapi.h"
#include "../../channelrx/demodlora/lorademodgui.h"
2015-01-10 19:12:58 -05:00
const PluginDescriptor LoRaPlugin::m_pluginDescriptor = {
QString("LoRa Demodulator"),
QString("2.0.0"),
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) :
QObject(parent)
{
}
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
}
2016-10-13 17:42:08 -04:00
PluginGUI* LoRaPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
2015-01-10 19:12:58 -05:00
{
if(channelName == LoRaDemodGUI::m_channelID)
{
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
2015-01-10 19:12:58 -05:00
return gui;
} else {
return NULL;
}
}
void LoRaPlugin::createInstanceLoRa(DeviceSourceAPI *deviceAPI)
2015-01-10 19:12:58 -05:00
{
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
2015-01-10 19:12:58 -05:00
}