From 7c7b24de0d1d1fca23c2487a8cb1e72a72917d38 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 23 Sep 2017 10:00:33 +0200 Subject: [PATCH] Corrected SDRdaemon source handling in the plugin manager --- sdrbase/plugin/pluginmanager.cpp | 34 +++----------------------------- sdrbase/plugin/pluginmanager.h | 2 -- 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/sdrbase/plugin/pluginmanager.cpp b/sdrbase/plugin/pluginmanager.cpp index 24083218d..d971259f7 100644 --- a/sdrbase/plugin/pluginmanager.cpp +++ b/sdrbase/plugin/pluginmanager.cpp @@ -32,10 +32,8 @@ #include "dsp/dspdevicesourceengine.h" #include "dsp/dspdevicesinkengine.h" -const QString PluginManager::m_sdrDaemonHardwareID = "SDRdaemon"; -const QString PluginManager::m_sdrDaemonDeviceTypeID = "sdrangel.samplesource.sdrdaemon"; -const QString PluginManager::m_sdrDaemonFECHardwareID = "SDRdaemonFEC"; -const QString PluginManager::m_sdrDaemonFECDeviceTypeID = "sdrangel.samplesource.sdrdaemonfec"; +const QString PluginManager::m_sdrDaemonHardwareID = "SDRdaemonSource"; +const QString PluginManager::m_sdrDaemonDeviceTypeID = "sdrangel.samplesource.sdrdaemonsource"; const QString PluginManager::m_fileSourceHardwareID = "FileSource"; const QString PluginManager::m_fileSourceDeviceTypeID = "sdrangel.samplesource.filesource"; const QString PluginManager::m_fileSinkDeviceTypeID = "sdrangel.samplesink.filesink"; @@ -169,10 +167,8 @@ void PluginManager::duplicateLocalSampleSourceDevices(uint deviceUID) } SamplingDevice *sdrDaemonSSD0 = 0; - SamplingDevice *sdrDaemonFECSSD0 = 0; SamplingDevice *fileSourceSSD0 = 0; bool duplicateSDRDaemon = true; - bool duplicateSDRDaemonFEC = true; bool duplicateFileSource = true; for(int i = 0; i < m_sampleSourceDevices.count(); ++i) @@ -186,15 +182,6 @@ void PluginManager::duplicateLocalSampleSourceDevices(uint deviceUID) duplicateSDRDaemon = false; } } - else if (m_sampleSourceDevices[i].m_deviceId == m_sdrDaemonFECDeviceTypeID) // SDRdaemon with FEC - { - if (m_sampleSourceDevices[i].m_deviceSequence == 0) { // reference to device 0 - sdrDaemonFECSSD0 = &m_sampleSourceDevices[i]; - } - else if (m_sampleSourceDevices[i].m_deviceSequence == deviceUID) { // already there - duplicateSDRDaemonFEC = false; - } - } else if (m_sampleSourceDevices[i].m_deviceId == m_fileSourceDeviceTypeID) // File Source { if (m_sampleSourceDevices[i].m_deviceSequence == 0) { // reference to device 0 @@ -211,7 +198,7 @@ void PluginManager::duplicateLocalSampleSourceDevices(uint deviceUID) m_sampleSourceDevices.append( SamplingDevice( sdrDaemonSSD0->m_plugin, - QString("SDRdaemon[%1]").arg(deviceUID), + QString("SDRdaemonSource[%1]").arg(deviceUID), sdrDaemonSSD0->m_hadrwareId, sdrDaemonSSD0->m_deviceId, sdrDaemonSSD0->m_deviceSerial, @@ -220,20 +207,6 @@ void PluginManager::duplicateLocalSampleSourceDevices(uint deviceUID) ); } - if (sdrDaemonFECSSD0 && duplicateSDRDaemonFEC) // append item for a new instance - { - m_sampleSourceDevices.append( - SamplingDevice( - sdrDaemonFECSSD0->m_plugin, - QString("SDRdaemonFEC[%1]").arg(deviceUID), - sdrDaemonFECSSD0->m_hadrwareId, - sdrDaemonFECSSD0->m_deviceId, - sdrDaemonFECSSD0->m_deviceSerial, - deviceUID - ) - ); - } - if (fileSourceSSD0 && duplicateFileSource) // append item for a new instance { m_sampleSourceDevices.append( @@ -294,7 +267,6 @@ void PluginManager::fillSampleSourceSelector(QComboBox* comboBox, uint deviceUID { // For "local" devices show only ones that concern this device set if ((m_sampleSourceDevices[i].m_deviceId == m_sdrDaemonDeviceTypeID) - || (m_sampleSourceDevices[i].m_deviceId == m_sdrDaemonFECDeviceTypeID) || (m_sampleSourceDevices[i].m_deviceId == m_fileSourceDeviceTypeID)) { if (deviceUID != m_sampleSourceDevices[i].m_deviceSequence) { diff --git a/sdrbase/plugin/pluginmanager.h b/sdrbase/plugin/pluginmanager.h index d447a3ee7..d2f5ca9ef 100644 --- a/sdrbase/plugin/pluginmanager.h +++ b/sdrbase/plugin/pluginmanager.h @@ -127,8 +127,6 @@ private: // "Local" sample source device IDs static const QString m_sdrDaemonHardwareID; //!< SDRdaemon hardware ID static const QString m_sdrDaemonDeviceTypeID; //!< SDRdaemon source plugin ID - static const QString m_sdrDaemonFECHardwareID; //!< SDRdaemon with FEC hardware ID - static const QString m_sdrDaemonFECDeviceTypeID; //!< SDRdaemon with FEC source plugin ID static const QString m_fileSourceHardwareID; //!< FileSource source hardware ID static const QString m_fileSourceDeviceTypeID; //!< FileSource source plugin ID