diff --git a/gr-jay/lib/preamble_sync_impl.cc b/gr-jay/lib/preamble_sync_impl.cc index 03ebd95..e7103ec 100644 --- a/gr-jay/lib/preamble_sync_impl.cc +++ b/gr-jay/lib/preamble_sync_impl.cc @@ -106,6 +106,7 @@ int preamble_sync_impl::general_work (int noutput_items, gr_vector_int &ninput_i switch (m_state) { case PreambleSlow: +#if 0 if ((m_word & 0xFF) == 0xCC) { m_wordSize = 8; @@ -116,6 +117,20 @@ int preamble_sync_impl::general_work (int noutput_items, gr_vector_int &ninput_i m_stateNext = SyncSlow; } + } + else +#endif + if ((m_word & 0xFF) == 0xAA) + { + m_wordSize = 8; + m_dataCount++; + if (m_dataCount == 4) + { + m_wordSize = 1; + m_dataCount = 0; + m_stateNext = SyncFast; + } + } else { @@ -146,9 +161,9 @@ int preamble_sync_impl::general_work (int noutput_items, gr_vector_int &ninput_i { m_wordSize = 8; m_dataCount++; - if (m_dataCount == 32) + if (m_dataCount == 8) { - m_wordSize = 8; + m_wordSize = 1; m_dataCount = 0; m_stateNext = SyncFast; } @@ -162,6 +177,7 @@ int preamble_sync_impl::general_work (int noutput_items, gr_vector_int &ninput_i if ((m_word & 0xFF) == fastSyncWord[m_dataCount]) { out[j++] = m_word; + m_wordSize = 8; m_dataCount++; if (m_dataCount == 4) {