Remove unnecessary link setup sync detection

This commit is contained in:
Jonathan Naylor 2021-08-26 18:28:14 +01:00
parent 1908a0ee9a
commit 6781dec322

View file

@ -110,14 +110,6 @@ void CM17RX::processData(bool bit)
// Only search for the syncs in the right place +-2 symbols
if (m_bufferPtr >= (M17_SYNC_LENGTH_BITS - 2U) && m_bufferPtr <= (M17_SYNC_LENGTH_BITS + 2U)) {
// Fuzzy matching of the stream sync bit sequence
if (countBits16(m_bitBuffer ^ M17_LINK_SETUP_SYNC_BITS) <= MAX_SYNC_BIT_RUN_ERRS) {
DEBUG2("M17RX: found link setup sync, pos", m_bufferPtr - M17_SYNC_LENGTH_BITS);
m_lostCount = MAX_SYNC_FRAMES;
m_bufferPtr = M17_SYNC_LENGTH_BITS;
m_state = M17RXS_LINK_SETUP;
}
// Fuzzy matching of the stream sync bit sequence
if (countBits16(m_bitBuffer ^ M17_STREAM_SYNC_BITS) <= MAX_SYNC_BIT_RUN_ERRS) {
DEBUG2("M17RX: found stream sync, pos", m_bufferPtr - M17_SYNC_LENGTH_BITS);