diff --git a/CMakeLists.txt b/CMakeLists.txt index 6abd8a712..56ddafd73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,8 +33,8 @@ ENDIF() ############################################################################## #include(${QT_USE_FILE}) -#set( QT_DEFINITIONS "${QT_DEFINITIONS} -DQT_NO_DEBUG_OUTPUT" ) -set( QT_DEFINITIONS "${QT_DEFINITIONS}" ) +set( QT_DEFINITIONS "${QT_DEFINITIONS} -DQT_NO_DEBUG_OUTPUT" ) +#set( QT_DEFINITIONS "${QT_DEFINITIONS}" ) add_definitions(${QT_DEFINITIONS}) if(MSVC) diff --git a/include/dsp/dspengine.h b/include/dsp/dspengine.h index 824694853..f1728216c 100644 --- a/include/dsp/dspengine.h +++ b/include/dsp/dspengine.h @@ -65,7 +65,8 @@ public: bool startAcquisition(); //!< Start acquisition sequence void stopAcquistion(); //!< Stop acquisition sequence - void setSource(SampleSource* source); //!< Set the unique sample source + void setSource(SampleSource* source); //!< Set the sample source type + void setSourceSequence(int sequence); //!< Set the sample source sequence in type void addSink(SampleSink* sink); //!< Add a sample sink void removeSink(SampleSink* sink); //!< Remove a sample sink @@ -94,6 +95,7 @@ private: QString m_deviceDescription; SampleSource* m_sampleSource; + int m_sampleSourceSequence; typedef std::list SampleSinks; SampleSinks m_sampleSinks; //!< sample sinks within main thread (usually spectrum, file output) diff --git a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp index be285240e..a730f1fe3 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp @@ -23,7 +23,6 @@ #include "rtlsdrgui.h" #include "dsp/dspcommands.h" #include "dsp/dspengine.h" -#include "util/prettyprint.h" MESSAGE_CLASS_DEFINITION(RTLSDRInput::MsgConfigureRTLSDR, Message) MESSAGE_CLASS_DEFINITION(RTLSDRInput::MsgReportRTLSDR, Message) @@ -48,8 +47,6 @@ bool RTLSDRInput::init(const Message& message) bool RTLSDRInput::start(int device) { - qDebug("%sRTLSDRInput::start: device: %d%s", qPrintable(EscapeColors::red), device, qPrintable(EscapeColors::terminator)); - QMutexLocker mutexLocker(&m_mutex); if (m_dev != 0) diff --git a/sdrbase/dsp/dspengine.cpp b/sdrbase/dsp/dspengine.cpp index 41d19e0d4..19383b9d1 100644 --- a/sdrbase/dsp/dspengine.cpp +++ b/sdrbase/dsp/dspengine.cpp @@ -29,6 +29,7 @@ DSPEngine::DSPEngine(QObject* parent) : QThread(parent), m_state(StNotStarted), m_sampleSource(0), + m_sampleSourceSequence(0), m_sampleSinks(), m_sampleRate(0), m_centerFrequency(0), @@ -120,6 +121,12 @@ void DSPEngine::setSource(SampleSource* source) m_syncMessenger.sendWait(cmd); } +void DSPEngine::setSourceSequence(int sequence) +{ + qDebug("DSPEngine::setSourceSequence: seq: %d", sequence); + m_sampleSourceSequence = sequence; +} + void DSPEngine::addSink(SampleSink* sink) { qDebug() << "DSPEngine::addSink: " << sink->objectName().toStdString().c_str(); @@ -460,7 +467,7 @@ DSPEngine::State DSPEngine::gotoRunning() // Start everything - if(!m_sampleSource->start(0)) + if(!m_sampleSource->start(m_sampleSourceSequence)) { return gotoError("Could not start sample source"); } @@ -508,12 +515,12 @@ void DSPEngine::handleSetSource(SampleSource* source) if(m_sampleSource != 0) { - qDebug() << "DSPEngine::handleSetSource: set " << source->getDeviceDescription().toStdString().c_str(); + qDebug("DSPEngine::handleSetSource: set %s", qPrintable(source->getDeviceDescription())); connect(m_sampleSource->getSampleFifo(), SIGNAL(dataReady()), this, SLOT(handleData()), Qt::QueuedConnection); } else { - qDebug() << "DSPEngine::handleSetSource: set none"; + qDebug("DSPEngine::handleSetSource: set none"); } } diff --git a/sdrbase/plugin/pluginmanager.cpp b/sdrbase/plugin/pluginmanager.cpp index 13ac0a080..bd660f7f3 100644 --- a/sdrbase/plugin/pluginmanager.cpp +++ b/sdrbase/plugin/pluginmanager.cpp @@ -308,12 +308,13 @@ int PluginManager::selectSampleSourceByIndex(int index) m_sampleSourceSerial = m_sampleSourceDevices[index].m_sourceSerial; m_sampleSourceSequence = m_sampleSourceDevices[index].m_sourceSequence; - qDebug() << "PluginManager::selectSampleSource by index: m_sampleSource at index " << index + qDebug() << "PluginManager::selectSampleSourceByIndex: m_sampleSource at index " << index << " id: " << m_sampleSourceId.toStdString().c_str() << " ser: " << m_sampleSourceSerial.toStdString().c_str() << " seq: " << m_sampleSourceSequence; m_sampleSourcePluginGUI = m_sampleSourceDevices[index].m_plugin->createSampleSourcePluginGUI(m_sampleSourceId); + m_dspEngine->setSourceSequence(m_sampleSourceSequence); return index; }