1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-28 07:46:37 -04:00

Server: variable to avoid instantiation of GUI dependent objects when compiling plugins for server: Applied to NFM demod

This commit is contained in:
f4exb 2017-12-17 18:11:51 +01:00
parent 0ec1d6db31
commit 38373fbd87

View File

@ -7,7 +7,7 @@
const PluginDescriptor NFMPlugin::m_pluginDescriptor = {
QString("NFM Demodulator"),
QString("3.8.5"),
QString("3.9.0"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,
@ -33,6 +33,15 @@ void NFMPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(NFMDemod::m_channelIdURI, NFMDemod::m_channelId, this);
}
#ifdef SERVER_MODE
PluginInstanceGUI* NFMPlugin::createRxChannelGUI(
const QString& channelName __attribute__((unused)),
DeviceUISet *deviceUISet __attribute__((unused)),
BasebandSampleSink *rxChannel __attribute__((unused)))
{
return 0;
}
#else
PluginInstanceGUI* NFMPlugin::createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
{
if(channelName == NFMDemod::m_channelIdURI) {
@ -42,6 +51,7 @@ PluginInstanceGUI* NFMPlugin::createRxChannelGUI(const QString& channelName, Dev
return 0;
}
}
#endif
BasebandSampleSink* NFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{