From d7c67d361a540e8486eefa770001e058102e5cd5 Mon Sep 17 00:00:00 2001 From: Bastian Bloessl Date: Sun, 24 Mar 2013 20:14:27 +0100 Subject: [PATCH] sync long: fix reset state --- lib/ofdm_sync_long.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/ofdm_sync_long.cc b/lib/ofdm_sync_long.cc index a59e92f..457bf8d 100644 --- a/lib/ofdm_sync_long.cc +++ b/lib/ofdm_sync_long.cc @@ -87,7 +87,7 @@ int general_work (int noutput, gr_vector_int& ninput_items, int o = 0; switch(d_state) { - + case SYNC: d_fir->filterN(d_correlation, in, std::min(SYNC_LENGTH, std::max(ninput - 63, 0))); @@ -150,10 +150,11 @@ int general_work (int noutput, gr_vector_int& ninput_items, d_freq_est = gr_complex(0, 0); d_state = SYNC; break; + } else if(rel > 15) { + out[o] = 0; + o++; } d_offset++; - out[o] = 0; - o++; } break;