diff --git a/plugins/samplesource/airspy/airspyinput.cpp b/plugins/samplesource/airspy/airspyinput.cpp index ab2d62be9..0d313d7ad 100644 --- a/plugins/samplesource/airspy/airspyinput.cpp +++ b/plugins/samplesource/airspy/airspyinput.cpp @@ -20,10 +20,9 @@ #include "airspygui.h" #include "airspyinput.h" -#include "util/simpleserializer.h" #include "dsp/dspcommands.h" #include "dsp/dspengine.h" -#include "airspyserializer.h" +#include "airspysettings.h" #include "airspythread.h" MESSAGE_CLASS_DEFINITION(AirspyInput::MsgConfigureAirspy, Message) diff --git a/plugins/samplesource/airspy/airspyplugin.cpp b/plugins/samplesource/airspy/airspyplugin.cpp index 21e9b7072..60343b1d0 100644 --- a/plugins/samplesource/airspy/airspyplugin.cpp +++ b/plugins/samplesource/airspy/airspyplugin.cpp @@ -32,6 +32,8 @@ const PluginDescriptor AirspyPlugin::m_pluginDescriptor = { QString("https://github.com/f4exb/sdrangel") }; +const QString AirspyPlugin::m_deviceTypeID = AIRSPY_DEVICE_TYPE_ID; + AirspyPlugin::AirspyPlugin(QObject* parent) : QObject(parent), m_pluginAPI(0) @@ -46,7 +48,7 @@ const PluginDescriptor& AirspyPlugin::getPluginDescriptor() const void AirspyPlugin::initPlugin(PluginAPI* pluginAPI) { m_pluginAPI = pluginAPI; - m_pluginAPI->registerSampleSource("org.osmocom.sdr.samplesource.airspy", this); + m_pluginAPI->registerSampleSource(m_deviceTypeID, this); } PluginInterface::SampleSourceDevices AirspyPlugin::enumSampleSources() @@ -93,7 +95,7 @@ PluginInterface::SampleSourceDevices AirspyPlugin::enumSampleSources() QString displayedName(QString("Airspy #%1 0x%2").arg(i).arg(serial_str)); result.append(SampleSourceDevice(displayedName, - "org.osmocom.sdr.samplesource.airspy", + m_deviceTypeID, serial_str, i)); @@ -122,7 +124,7 @@ PluginGUI* AirspyPlugin::createSampleSourcePluginGUI(const QString& sourceId) return 0; } - if(sourceId == "org.osmocom.sdr.samplesource.airspy") + if(sourceId == m_deviceTypeID) { AirspyGui* gui = new AirspyGui(m_pluginAPI); m_pluginAPI->setInputGUI(gui); diff --git a/plugins/samplesource/airspy/airspyplugin.h b/plugins/samplesource/airspy/airspyplugin.h index 39a6caeec..c23dcbe99 100644 --- a/plugins/samplesource/airspy/airspyplugin.h +++ b/plugins/samplesource/airspy/airspyplugin.h @@ -20,10 +20,12 @@ #include #include "plugin/plugininterface.h" +#define AIRSPY_DEVICE_TYPE_ID "sdrangel.samplesource.airspy" + class AirspyPlugin : public QObject, public PluginInterface { Q_OBJECT Q_INTERFACES(PluginInterface) - Q_PLUGIN_METADATA(IID "org.osmocom.sdr.samplesource.airspy") + Q_PLUGIN_METADATA(IID AIRSPY_DEVICE_TYPE_ID) public: explicit AirspyPlugin(QObject* parent = NULL); @@ -34,6 +36,8 @@ public: virtual SampleSourceDevices enumSampleSources(); virtual PluginGUI* createSampleSourcePluginGUI(const QString& sourceId); + static const QString m_deviceTypeID; + private: static const PluginDescriptor m_pluginDescriptor;