Author: trondeau
Date: 2007-02-21 20:52:39 -0700 (Wed, 21 Feb 2007)
New Revision: 4574
Modified:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.cc.t
Log:
fixed warnings in peak detector
Modified:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.cc.t
===================================================================
---
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.cc.t
2007-02-22 00:21:19 UTC (rev 4573)
+++
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.cc.t
2007-02-22 03:52:39 UTC (rev 4574)
@@ -61,7 +61,7 @@
memset(optr, 0, noutput_items*sizeof(@O_TYPE@));
- @I_TYPE@ peak_val = -INFINITY;
+ @I_TYPE@ peak_val = -(@I_TYPE@)INFINITY;
int peak_ind = 0;
unsigned char state = 0;
int i = 0;
@@ -92,8 +92,9 @@
else {
optr[peak_ind] = (@O_TYPE@)1;
state = 0;
- peak_val = -INFINITY;
- //printf("Leaving State 1: Peak: %f Peak Ind: %d i: %d
noutput_items: %d\n", peak_val, peak_ind, i, noutput_items);
+ peak_val = -(@I_TYPE@)INFINITY;
+ //printf("Leaving State 1: Peak: %f Peak Ind: %d i: %d
noutput_items: %d\n",
+ //peak_val, peak_ind, i, noutput_items);
}
}
}
@@ -102,7 +103,7 @@
//printf("Leave in State 0, produced %d\n",noutput_items);
return noutput_items;
}
- else if(state == 1) { // only return up to passing the threshold
+ else { // only return up to passing the threshold
//printf("Leave in State 1, only produced %d of
%d\n",peak_ind,noutput_items);
return peak_ind;
}
_______________________________________________
Commit-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnuradio