mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-17 23:28:50 -05:00
Multi device support: partially removed DSPDeviceEngine dependency in plugin manager
This commit is contained in:
parent
9013e057fa
commit
6747a1cae7
@ -99,6 +99,11 @@ void DeviceAPI::configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCo
|
||||
m_deviceEngine->configureCorrections(dcOffsetCorrection, iqImbalanceCorrection);
|
||||
}
|
||||
|
||||
void DeviceAPI::setSourceSequence(int sourceSequence)
|
||||
{
|
||||
m_deviceEngine->setSourceSequence(sourceSequence);
|
||||
}
|
||||
|
||||
GLSpectrum *DeviceAPI::getSpectrum()
|
||||
{
|
||||
return m_spectrum;
|
||||
|
@ -34,6 +34,7 @@ class SampleSource;
|
||||
class MessageQueue;
|
||||
class ChannelMarker;
|
||||
class QWidget;
|
||||
class PluginGUI;
|
||||
|
||||
class SDRANGEL_API DeviceAPI : public QObject {
|
||||
Q_OBJECT
|
||||
@ -54,6 +55,7 @@ public:
|
||||
MessageQueue *getDeviceInputMessageQueue();
|
||||
MessageQueue *getDeviceOutputMessageQueue();
|
||||
void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection); //!< Configure current device engine DSP corrections
|
||||
void setSourceSequence(int sourceSequence);
|
||||
|
||||
// device related stuff
|
||||
GLSpectrum *getSpectrum(); //!< Direct spectrum getter
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "plugin/pluginmanager.h"
|
||||
#include "plugin/plugingui.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "settings/preset.h"
|
||||
#include "mainwindow.h"
|
||||
#include "gui/glspectrum.h"
|
||||
@ -286,11 +287,11 @@ int PluginManager::selectSampleSourceByIndex(int index, DeviceAPI *deviceAPI)
|
||||
{
|
||||
qDebug("PluginManager::selectSampleSourceByIndex: index: %d", index);
|
||||
|
||||
m_dspDeviceEngine->stopAcquistion();
|
||||
deviceAPI->stopAcquisition();
|
||||
|
||||
if(m_sampleSourcePluginGUI != NULL) {
|
||||
m_dspDeviceEngine->stopAcquistion();
|
||||
m_dspDeviceEngine->setSource(NULL);
|
||||
deviceAPI->stopAcquisition();
|
||||
deviceAPI->setSource(0);
|
||||
m_sampleSourcePluginGUI->destroy();
|
||||
m_sampleSourcePluginGUI = NULL;
|
||||
m_sampleSourceId.clear();
|
||||
@ -321,7 +322,7 @@ int PluginManager::selectSampleSourceByIndex(int index, DeviceAPI *deviceAPI)
|
||||
<< " seq: " << m_sampleSourceSequence;
|
||||
|
||||
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;
|
||||
}
|
||||
@ -332,11 +333,11 @@ int PluginManager::selectFirstSampleSource(const QString& sourceId, DeviceAPI *d
|
||||
|
||||
int index = -1;
|
||||
|
||||
m_dspDeviceEngine->stopAcquistion();
|
||||
deviceAPI->stopAcquisition();
|
||||
|
||||
if(m_sampleSourcePluginGUI != NULL) {
|
||||
m_dspDeviceEngine->stopAcquistion();
|
||||
m_dspDeviceEngine->setSource(NULL);
|
||||
deviceAPI->stopAcquisition();
|
||||
deviceAPI->setSource(0);
|
||||
m_sampleSourcePluginGUI->destroy();
|
||||
m_sampleSourcePluginGUI = NULL;
|
||||
m_sampleSourceId.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user