1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-04 16:01:14 -05:00

Fixed DSP device source/sink run command

This commit is contained in:
f4exb 2018-02-14 17:33:08 +01:00
parent 8f3ef9e76d
commit e9c8dad663
4 changed files with 3 additions and 26 deletions

View File

@ -17,7 +17,6 @@
#include "dsp/dspcommands.h" #include "dsp/dspcommands.h"
MESSAGE_CLASS_DEFINITION(DSPExit, Message)
MESSAGE_CLASS_DEFINITION(DSPAcquisitionInit, Message) MESSAGE_CLASS_DEFINITION(DSPAcquisitionInit, Message)
MESSAGE_CLASS_DEFINITION(DSPAcquisitionStart, Message) MESSAGE_CLASS_DEFINITION(DSPAcquisitionStart, Message)
MESSAGE_CLASS_DEFINITION(DSPAcquisitionStop, Message) MESSAGE_CLASS_DEFINITION(DSPAcquisitionStop, Message)

View File

@ -31,10 +31,6 @@ class BasebandSampleSource;
class ThreadedBasebandSampleSource; class ThreadedBasebandSampleSource;
class AudioFifo; class AudioFifo;
class SDRANGEL_API DSPExit : public Message {
MESSAGE_CLASS_DECLARATION
};
class SDRANGEL_API DSPAcquisitionInit : public Message { class SDRANGEL_API DSPAcquisitionInit : public Message {
MESSAGE_CLASS_DECLARATION MESSAGE_CLASS_DECLARATION
}; };

View File

@ -55,10 +55,7 @@ DSPDeviceSinkEngine::~DSPDeviceSinkEngine()
void DSPDeviceSinkEngine::run() void DSPDeviceSinkEngine::run()
{ {
qDebug() << "DSPDeviceSinkEngine::run"; qDebug() << "DSPDeviceSinkEngine::run";
m_state = StIdle; m_state = StIdle;
m_syncMessenger.done(); // Release start() that is waiting in main thread
exec(); exec();
} }
@ -430,13 +427,7 @@ void DSPDeviceSinkEngine::handleSynchronousMessages()
Message *message = m_syncMessenger.getMessage(); Message *message = m_syncMessenger.getMessage();
qDebug() << "DSPDeviceSinkEngine::handleSynchronousMessages: " << message->getIdentifier(); qDebug() << "DSPDeviceSinkEngine::handleSynchronousMessages: " << message->getIdentifier();
if (DSPExit::match(*message)) if (DSPGenerationInit::match(*message))
{
gotoIdle();
m_state = StNotStarted;
exit();
}
else if (DSPGenerationInit::match(*message))
{ {
m_state = gotoIdle(); m_state = gotoIdle();

View File

@ -59,11 +59,8 @@ DSPDeviceSourceEngine::~DSPDeviceSourceEngine()
void DSPDeviceSourceEngine::run() void DSPDeviceSourceEngine::run()
{ {
qDebug() << "DSPDeviceSourceEngine::run"; qDebug() << "DSPDeviceSourceEngine::run";
m_state = StIdle; m_state = StIdle;
exec();
m_syncMessenger.done(); // Release start() that is waiting in main thread
exec();
} }
void DSPDeviceSourceEngine::start() void DSPDeviceSourceEngine::start()
@ -612,13 +609,7 @@ void DSPDeviceSourceEngine::handleSynchronousMessages()
Message *message = m_syncMessenger.getMessage(); Message *message = m_syncMessenger.getMessage();
qDebug() << "DSPDeviceSourceEngine::handleSynchronousMessages: " << message->getIdentifier(); qDebug() << "DSPDeviceSourceEngine::handleSynchronousMessages: " << message->getIdentifier();
if (DSPExit::match(*message)) if (DSPAcquisitionInit::match(*message))
{
gotoIdle();
m_state = StNotStarted;
exit();
}
else if (DSPAcquisitionInit::match(*message))
{ {
m_state = gotoIdle(); m_state = gotoIdle();