Restrict the range of the locked sync correlator.

This commit is contained in:
Jonathan Naylor 2016-04-01 10:33:10 +01:00
parent 98bebcd27f
commit fdee1cbd5b
1 changed files with 2 additions and 2 deletions

View File

@ -107,8 +107,8 @@ bool CDMRSlotRX::processSample(q15_t sample)
if (m_dataPtr >= 840U && m_dataPtr <= 910U)
correlateSync();
} else {
uint16_t min = m_syncPtr - 2U;
uint16_t max = m_syncPtr + 2U;
uint16_t min = m_syncPtr - 1U;
uint16_t max = m_syncPtr + 1U;
if (m_dataPtr >= min && m_dataPtr <= max)
correlateSync();
}