[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r4575 - gnuradio/branches/developers/n4hy/ofdm/gnuradi
From: |
trondeau |
Subject: |
[Commit-gnuradio] r4575 - gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/general |
Date: |
Wed, 21 Feb 2007 20:53:08 -0700 (MST) |
Author: trondeau
Date: 2007-02-21 20:53:07 -0700 (Wed, 21 Feb 2007)
New Revision: 4575
Modified:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/general/gr_ofdm_sampler.cc
Log:
fixed bug in ofdm sampler
Modified:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/general/gr_ofdm_sampler.cc
===================================================================
---
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/general/gr_ofdm_sampler.cc
2007-02-22 03:52:39 UTC (rev 4574)
+++
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/general/gr_ofdm_sampler.cc
2007-02-22 03:53:07 UTC (rev 4575)
@@ -69,16 +69,26 @@
unsigned int i=d_fft_length-1;
- while(!found && i<ninput_items[0])
+ while(!found && i<std::min(ninput_items[0],ninput_items[1]) )
if(trigger[i].real() > 0.5)
found = 1;
else
i++;
- if(found)
+ if(found) {
+ assert(i-d_fft_length+1 >= 0);
for(unsigned int j=i-d_fft_length+1;j<=i;j++)
*optr++ = iptr[j];
+ consume_each(i-d_fft_length+2);
+ //printf("OFDM Sampler found: ninput_items: %d/%d noutput_items: %d
consumed: %d found: %d\n",
+ // ninput_items[0], ninput_items[1], noutput_items, (i-d_fft_length+2),
found);
+ }
+ else {
+ consume_each(i-d_fft_length+1);
+ //printf("OFDM Sampler not found: ninput_items: %d/%d noutput_items: %d
consumed: %d found: %d\n",
+ // ninput_items[0], ninput_items[1], noutput_items, (i-d_fft_length+1),
found);
+ }
- consume_each(i-d_fft_length+2);
+
return found;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r4575 - gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/general,
trondeau <=