From b0ba1c33a96796cc50cce9afc96b235e4780d8eb Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Tue, 11 May 2021 10:06:03 +0100 Subject: [PATCH] Rename sample to symbol --- plugins/channelrx/demodais/aisdemodsink.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/channelrx/demodais/aisdemodsink.cpp b/plugins/channelrx/demodais/aisdemodsink.cpp index bf6f75ee3..007501d4a 100644 --- a/plugins/channelrx/demodais/aisdemodsink.cpp +++ b/plugins/channelrx/demodais/aisdemodsink.cpp @@ -186,21 +186,21 @@ void AISDemodSink::processOneSample(Complex &ci) for (int i = 0; i < sampleCnt; i++) { sampleSum += m_rxBuf[(x + sampleOffset + i) % m_rxBufLength] - dcOffset; } - int sample = sampleSum >= 0.0f ? 1 : 0; + int symbol = sampleSum >= 0.0f ? 1 : 0; - // Move to next sample + // Move to next symbol x = (x + m_samplesPerSymbol) % m_rxBufLength; // HDLC deframing // NRZI decoding int bit; - if (sample != symbolPrev) { + if (symbol != symbolPrev) { bit = 0; } else { bit = 1; } - symbolPrev = sample; + symbolPrev = symbol; // Store in shift reg bits |= bit << bitCount;