mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-31 04:50:29 -04:00 
			
		
		
		
	Airspy serialization redesign final
This commit is contained in:
		
							parent
							
								
									fbda81163a
								
							
						
					
					
						commit
						49763934ea
					
				| @ -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) | ||||
|  | ||||
| @ -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); | ||||
|  | ||||
| @ -20,10 +20,12 @@ | ||||
| #include <QObject> | ||||
| #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; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user