mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-10-15 00:04:11 +02:00
Shift the control information in line with the samples.
This commit is contained in:
@@ -198,6 +198,7 @@ void CIO::start()
|
|||||||
m_pinLED.write(1);
|
m_pinLED.write(1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
m_count = 0U;
|
||||||
m_started = true;
|
m_started = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,11 +283,14 @@ void CIO::process()
|
|||||||
|
|
||||||
if (m_count >= m_sampleCount) {
|
if (m_count >= m_sampleCount) {
|
||||||
if (m_sampleInsert) {
|
if (m_sampleInsert) {
|
||||||
control[RX_BLOCK_SIZE] = control[RX_BLOCK_SIZE - 1U];
|
|
||||||
samples[RX_BLOCK_SIZE] = 0;
|
|
||||||
blockSize = RX_BLOCK_SIZE + 1U;
|
blockSize = RX_BLOCK_SIZE + 1U;
|
||||||
|
samples[RX_BLOCK_SIZE] = 0;
|
||||||
|
for (int8_t i = RX_BLOCK_SIZE - 1; i >= 0; i--)
|
||||||
|
control[i + 1] = control[i];
|
||||||
} else {
|
} else {
|
||||||
blockSize = RX_BLOCK_SIZE - 1U;
|
blockSize = RX_BLOCK_SIZE - 1U;
|
||||||
|
for (uint8_t i = 0U; i < (RX_BLOCK_SIZE - 1U); i++)
|
||||||
|
control[i] = control[i + 1U];
|
||||||
}
|
}
|
||||||
|
|
||||||
m_count -= m_sampleCount;
|
m_count -= m_sampleCount;
|
||||||
|
|||||||
Reference in New Issue
Block a user