From fd78dda5660cd616eb61065b0d4880227003c1b4 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 27 Sep 2015 15:47:51 +0200 Subject: [PATCH] Fixed stop acquisition not working when sample rate is too high --- include/util/syncmessenger.h | 1 + plugins/samplesource/hackrf/hackrfgui.cpp | 2 +- sdrbase/dsp/dspengine.cpp | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/util/syncmessenger.h b/include/util/syncmessenger.h index b6d1b737e..d9c59ddba 100644 --- a/include/util/syncmessenger.h +++ b/include/util/syncmessenger.h @@ -38,6 +38,7 @@ public: int sendWait(Message& message, unsigned long msPollTime = 100); //!< Send message and waits for its process completion Message* getMessage() const { return m_message; } + void storeMessage(Message& message) { m_message = &message; } void done(int result = 0); //!< Processing of the message is complete signals: diff --git a/plugins/samplesource/hackrf/hackrfgui.cpp b/plugins/samplesource/hackrf/hackrfgui.cpp index 09fcf34b6..382f93429 100644 --- a/plugins/samplesource/hackrf/hackrfgui.cpp +++ b/plugins/samplesource/hackrf/hackrfgui.cpp @@ -259,7 +259,7 @@ void HackRFGui::on_vga_valueChanged(int value) void HackRFGui::updateHardware() { - qDebug() << "AirspyGui::updateHardware"; + qDebug() << "HackRFGui::updateHardware"; HackRFInput::MsgConfigureHackRF* message = HackRFInput::MsgConfigureHackRF::create( m_settings); m_sampleSource->getInputMessageQueue()->push(message); m_updateTimer.stop(); diff --git a/sdrbase/dsp/dspengine.cpp b/sdrbase/dsp/dspengine.cpp index beefe183a..601545b22 100644 --- a/sdrbase/dsp/dspengine.cpp +++ b/sdrbase/dsp/dspengine.cpp @@ -103,7 +103,9 @@ void DSPEngine::stopAcquistion() { qDebug() << "DSPEngine::stopAcquistion"; DSPAcquisitionStop cmd; - m_syncMessenger.sendWait(cmd); + m_syncMessenger.storeMessage(cmd); + handleSynchronousMessages(); + if(m_dcOffsetCorrection) {