1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-16 13:21:50 -05:00

Multi device support: partially removed DSPDeviceEngine dependency in plugin manager

This commit is contained in:
f4exb 2016-05-16 11:32:22 +02:00
parent 9013e057fa
commit 6747a1cae7
3 changed files with 15 additions and 7 deletions

View File

@ -99,6 +99,11 @@ void DeviceAPI::configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCo
m_deviceEngine->configureCorrections(dcOffsetCorrection, iqImbalanceCorrection); m_deviceEngine->configureCorrections(dcOffsetCorrection, iqImbalanceCorrection);
} }
void DeviceAPI::setSourceSequence(int sourceSequence)
{
m_deviceEngine->setSourceSequence(sourceSequence);
}
GLSpectrum *DeviceAPI::getSpectrum() GLSpectrum *DeviceAPI::getSpectrum()
{ {
return m_spectrum; return m_spectrum;

View File

@ -34,6 +34,7 @@ class SampleSource;
class MessageQueue; class MessageQueue;
class ChannelMarker; class ChannelMarker;
class QWidget; class QWidget;
class PluginGUI;
class SDRANGEL_API DeviceAPI : public QObject { class SDRANGEL_API DeviceAPI : public QObject {
Q_OBJECT Q_OBJECT
@ -54,6 +55,7 @@ public:
MessageQueue *getDeviceInputMessageQueue(); MessageQueue *getDeviceInputMessageQueue();
MessageQueue *getDeviceOutputMessageQueue(); MessageQueue *getDeviceOutputMessageQueue();
void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection); //!< Configure current device engine DSP corrections void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection); //!< Configure current device engine DSP corrections
void setSourceSequence(int sourceSequence);
// device related stuff // device related stuff
GLSpectrum *getSpectrum(); //!< Direct spectrum getter GLSpectrum *getSpectrum(); //!< Direct spectrum getter

View File

@ -5,6 +5,7 @@
#include "plugin/pluginmanager.h" #include "plugin/pluginmanager.h"
#include "plugin/plugingui.h" #include "plugin/plugingui.h"
#include "device/deviceapi.h"
#include "settings/preset.h" #include "settings/preset.h"
#include "mainwindow.h" #include "mainwindow.h"
#include "gui/glspectrum.h" #include "gui/glspectrum.h"
@ -286,11 +287,11 @@ int PluginManager::selectSampleSourceByIndex(int index, DeviceAPI *deviceAPI)
{ {
qDebug("PluginManager::selectSampleSourceByIndex: index: %d", index); qDebug("PluginManager::selectSampleSourceByIndex: index: %d", index);
m_dspDeviceEngine->stopAcquistion(); deviceAPI->stopAcquisition();
if(m_sampleSourcePluginGUI != NULL) { if(m_sampleSourcePluginGUI != NULL) {
m_dspDeviceEngine->stopAcquistion(); deviceAPI->stopAcquisition();
m_dspDeviceEngine->setSource(NULL); deviceAPI->setSource(0);
m_sampleSourcePluginGUI->destroy(); m_sampleSourcePluginGUI->destroy();
m_sampleSourcePluginGUI = NULL; m_sampleSourcePluginGUI = NULL;
m_sampleSourceId.clear(); m_sampleSourceId.clear();
@ -321,7 +322,7 @@ int PluginManager::selectSampleSourceByIndex(int index, DeviceAPI *deviceAPI)
<< " seq: " << m_sampleSourceSequence; << " seq: " << m_sampleSourceSequence;
m_sampleSourcePluginGUI = m_sampleSourceDevices[index].m_plugin->createSampleSourcePluginGUI(m_sampleSourceId, m_sampleSourceDevices[index].m_displayName, deviceAPI); m_sampleSourcePluginGUI = m_sampleSourceDevices[index].m_plugin->createSampleSourcePluginGUI(m_sampleSourceId, m_sampleSourceDevices[index].m_displayName, deviceAPI);
m_dspDeviceEngine->setSourceSequence(m_sampleSourceSequence); deviceAPI->setSourceSequence(m_sampleSourceSequence);
return index; return index;
} }
@ -332,11 +333,11 @@ int PluginManager::selectFirstSampleSource(const QString& sourceId, DeviceAPI *d
int index = -1; int index = -1;
m_dspDeviceEngine->stopAcquistion(); deviceAPI->stopAcquisition();
if(m_sampleSourcePluginGUI != NULL) { if(m_sampleSourcePluginGUI != NULL) {
m_dspDeviceEngine->stopAcquistion(); deviceAPI->stopAcquisition();
m_dspDeviceEngine->setSource(NULL); deviceAPI->setSource(0);
m_sampleSourcePluginGUI->destroy(); m_sampleSourcePluginGUI->destroy();
m_sampleSourcePluginGUI = NULL; m_sampleSourcePluginGUI = NULL;
m_sampleSourceId.clear(); m_sampleSourceId.clear();