mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-10 10:33:29 -05:00
Corrected SDRdaemon source handling in the plugin manager
This commit is contained in:
parent
69be1d59ee
commit
7c7b24de0d
@ -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) {
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user