mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 13:21:50 -05:00
Rename sample to symbol
This commit is contained in:
parent
da107c9258
commit
b0ba1c33a9
@ -186,21 +186,21 @@ void AISDemodSink::processOneSample(Complex &ci)
|
|||||||
for (int i = 0; i < sampleCnt; i++) {
|
for (int i = 0; i < sampleCnt; i++) {
|
||||||
sampleSum += m_rxBuf[(x + sampleOffset + i) % m_rxBufLength] - dcOffset;
|
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;
|
x = (x + m_samplesPerSymbol) % m_rxBufLength;
|
||||||
|
|
||||||
// HDLC deframing
|
// HDLC deframing
|
||||||
|
|
||||||
// NRZI decoding
|
// NRZI decoding
|
||||||
int bit;
|
int bit;
|
||||||
if (sample != symbolPrev) {
|
if (symbol != symbolPrev) {
|
||||||
bit = 0;
|
bit = 0;
|
||||||
} else {
|
} else {
|
||||||
bit = 1;
|
bit = 1;
|
||||||
}
|
}
|
||||||
symbolPrev = sample;
|
symbolPrev = symbol;
|
||||||
|
|
||||||
// Store in shift reg
|
// Store in shift reg
|
||||||
bits |= bit << bitCount;
|
bits |= bit << bitCount;
|
||||||
|
Loading…
Reference in New Issue
Block a user