From 38373fbd87176aeb5eda645e2d4bbe55134fd461 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 17 Dec 2017 18:11:51 +0100 Subject: [PATCH] Server: variable to avoid instantiation of GUI dependent objects when compiling plugins for server: Applied to NFM demod --- plugins/channelrx/demodnfm/nfmplugin.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/demodnfm/nfmplugin.cpp b/plugins/channelrx/demodnfm/nfmplugin.cpp index d164411a4..842db7945 100644 --- a/plugins/channelrx/demodnfm/nfmplugin.cpp +++ b/plugins/channelrx/demodnfm/nfmplugin.cpp @@ -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) {