From 8bc1a204c5eb47f625a3317799b89d679339e638 Mon Sep 17 00:00:00 2001 From: f4exb Date: Fri, 1 Jul 2022 05:56:12 +0200 Subject: [PATCH] M17 mod: allow connection to Demod Analyzer --- plugins/channeltx/modm17/m17modsource.cpp | 14 +++++++------- plugins/channeltx/modm17/m17modsource.h | 4 ++-- .../demodanalyzer/demodanalyzersettings.cpp | 2 ++ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/plugins/channeltx/modm17/m17modsource.cpp b/plugins/channeltx/modm17/m17modsource.cpp index c985997d2..cc01fc702 100644 --- a/plugins/channeltx/modm17/m17modsource.cpp +++ b/plugins/channeltx/modm17/m17modsource.cpp @@ -55,8 +55,8 @@ M17ModSource::M17ModSource() : m_feedbackAudioBuffer.resize(1<<14); m_feedbackAudioBufferFill = 0; - m_demodBuffer.resize(1<<12); - m_demodBufferFill = 0; + m_modBuffer.resize(1<<12); + m_modBufferFill = 0; m_magsq = 0.0; @@ -193,10 +193,10 @@ void M17ModSource::modulateSample() m_modSample.imag(0.0f); } - m_demodBuffer[m_demodBufferFill] = t1 * std::numeric_limits::max(); - ++m_demodBufferFill; + m_modBuffer[m_modBufferFill] = t1 * std::numeric_limits::max(); + ++m_modBufferFill; - if (m_demodBufferFill >= m_demodBuffer.size()) + if (m_modBufferFill >= m_modBuffer.size()) { QList dataPipes; MainCore::instance()->getDataPipes().getDataPipes(m_channel, "demod", dataPipes); @@ -210,12 +210,12 @@ void M17ModSource::modulateSample() DataFifo *fifo = qobject_cast((*it)->m_element); if (fifo) { - fifo->write((quint8*) &m_demodBuffer[0], m_demodBuffer.size() * sizeof(qint16), DataFifo::DataTypeI16); + fifo->write((quint8*) &m_modBuffer[0], m_modBuffer.size() * sizeof(qint16), DataFifo::DataTypeI16); } } } - m_demodBufferFill = 0; + m_modBufferFill = 0; } } diff --git a/plugins/channeltx/modm17/m17modsource.h b/plugins/channeltx/modm17/m17modsource.h index 0db44fc49..c87399362 100644 --- a/plugins/channeltx/modm17/m17modsource.h +++ b/plugins/channeltx/modm17/m17modsource.h @@ -93,8 +93,8 @@ private: Real m_feedbackInterpolatorDistanceRemain; bool m_feedbackInterpolatorConsumed; - QVector m_demodBuffer; - int m_demodBufferFill; + QVector m_modBuffer; + int m_modBufferFill; Lowpass m_lowpass; diff --git a/plugins/feature/demodanalyzer/demodanalyzersettings.cpp b/plugins/feature/demodanalyzer/demodanalyzersettings.cpp index 37eaae25b..aa894abd3 100644 --- a/plugins/feature/demodanalyzer/demodanalyzersettings.cpp +++ b/plugins/feature/demodanalyzer/demodanalyzersettings.cpp @@ -31,6 +31,7 @@ const QStringList DemodAnalyzerSettings::m_channelTypes = { QStringLiteral("DABDemod"), QStringLiteral("DSDDemod"), QStringLiteral("M17Demod"), + QStringLiteral("M17Mmod"), QStringLiteral("NFMDemod"), QStringLiteral("NFMMod"), QStringLiteral("PacketDemod"), @@ -51,6 +52,7 @@ const QStringList DemodAnalyzerSettings::m_channelURIs = { QStringLiteral("sdrangel.channel.dabdemod"), QStringLiteral("sdrangel.channel.dsddemod"), QStringLiteral("sdrangel.channel.m17demod"), + QStringLiteral("sdrangel.channeltx.modm17"), QStringLiteral("sdrangel.channel.nfmdemod"), QStringLiteral("sdrangel.channeltx.modnfm"), QStringLiteral("sdrangel.channel.packetdemod"),