1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-03 06:24:48 -04:00

MainWindow: Add FSMs to avoid blocking on the GUI thread.

DSPDevice*Engine: Add signals to indicate when commands have been processed.
DSPDeviceSourceEngine: Fix small memory leak.
DSPEngine::removeDeviceEngineAt: Remove wait to avoid blocking thread. Return QThread to get finished signal.
DSPEngine::addDevice*Engine: Don't call deleteLater for device*Engine, as these objects are deleted manually in MainWindow, which will crash if deleteLater called first.
This commit is contained in:
srcejon
2024-10-10 13:57:11 +01:00
parent f24600b909
commit 78d0160514
12 changed files with 1271 additions and 558 deletions
+4
View File
@@ -1030,6 +1030,7 @@ bool DSPDeviceMIMOEngine::handleMessage(const Message& message)
else if (DSPAcquisitionStop::match(message))
{
setStateRx(gotoIdle(0));
emit acquisitionStopped();
return true;
}
else if (DSPGenerationInit::match(message))
@@ -1053,11 +1054,13 @@ bool DSPDeviceMIMOEngine::handleMessage(const Message& message)
else if (DSPGenerationStop::match(message))
{
setStateTx(gotoIdle(1));
emit generationStopped();
return true;
}
else if (SetSampleMIMO::match(message)) {
const auto& cmd = (const SetSampleMIMO&) message;
handleSetMIMO(cmd.getSampleMIMO());
emit sampleSet();
return true;
}
else if (AddBasebandSampleSink::match(message))
@@ -1194,6 +1197,7 @@ bool DSPDeviceMIMOEngine::handleMessage(const Message& message)
BasebandSampleSink* spectrumSink = msg.getSampleSink();
spectrumSink->stop();
m_spectrumSink = nullptr;
emit spectrumSinkRemoved();
return true;
}
else if (SetSpectrumSinkInput::match(message))