APT demod: send settings to image worker

pull/866/head
f4exb 2021-04-23 00:17:52 +02:00
rodzic 6b106f21ad
commit 58f7b96634
2 zmienionych plików z 26 dodań i 3 usunięć

Wyświetl plik

@ -309,9 +309,14 @@ void APTDemod::applySettings(const APTDemodSettings& settings, bool force)
reverseAPIKeys.append("streamIndex");
}
APTDemodBaseband::MsgConfigureAPTDemodBaseband *msg = APTDemodBaseband::MsgConfigureAPTDemodBaseband::create(settings, force);
APTDemodBaseband::MsgConfigureAPTDemodBaseband *msg
= APTDemodBaseband::MsgConfigureAPTDemodBaseband::create(settings, force);
m_basebandSink->getInputMessageQueue()->push(msg);
APTDemodImageWorker::MsgConfigureAPTDemodImageWorker *msgToImg
= APTDemodImageWorker::MsgConfigureAPTDemodImageWorker::create(settings, force);
m_imageWorker->getInputMessageQueue()->push(msgToImg);
if (settings.m_useReverseAPI)
{
bool fullUpdate = ((m_settings.m_useReverseAPI != settings.m_useReverseAPI) && settings.m_useReverseAPI) ||
@ -336,8 +341,8 @@ void APTDemod::applySettings(const APTDemodSettings& settings, bool force)
m_settings = settings;
if (callProcessImage)
sendImageToGUI();
// if (callProcessImage)
// sendImageToGUI();
}
QByteArray APTDemod::serialize() const

Wyświetl plik

@ -121,7 +121,25 @@ bool APTDemodImageWorker::handleMessage(const Message& cmd)
void APTDemodImageWorker::applySettings(const APTDemodSettings& settings, bool force)
{
(void) force;
bool callProcessImage = false;
if ((settings.m_cropNoise != m_settings.m_cropNoise) ||
(settings.m_denoise != m_settings.m_denoise) ||
(settings.m_linearEqualise != m_settings.m_linearEqualise) ||
(settings.m_histogramEqualise != m_settings.m_histogramEqualise) ||
(settings.m_precipitationOverlay != m_settings.m_precipitationOverlay) ||
(settings.m_flip != m_settings.m_flip) ||
(settings.m_channels != m_settings.m_channels))
{
// Call after settings have been applied
callProcessImage = true;
}
m_settings = settings;
if (callProcessImage) {
sendImageToGUI();
}
}
void APTDemodImageWorker::resetDecoder()