projects
/
debian
/
gnuradio
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9d3f297
)
Adding more outputs for debugging.
author
Tom
<trondeau@vt.edu>
Wed, 7 Oct 2009 00:49:49 +0000
(17:49 -0700)
committer
Tom
<trondeau@vt.edu>
Wed, 7 Oct 2009 00:49:49 +0000
(17:49 -0700)
gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc
patch
|
blob
|
history
diff --git
a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc
b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc
index b67efc52d456c6a20abcd0933882d2f12f55738d..79779c91cf6ad206e425077c64194f21a0cb970b 100644
(file)
--- a/
gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc
+++ b/
gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc
@@
-209,9
+209,12
@@
gr_pfb_clock_sync_ccf::general_work (int noutput_items,
gr_complex *in = (gr_complex *) input_items[0];
gr_complex *out = (gr_complex *) output_items[0];
gr_complex *in = (gr_complex *) input_items[0];
gr_complex *out = (gr_complex *) output_items[0];
- float *err;
- if(
ninput_items.size() == 2)
+ float *err
, *outrate, *outk
;
+ if(
output_items.size() > 2) {
err = (float *) output_items[1];
err = (float *) output_items[1];
+ outrate = (float*)output_items[2];
+ outk = (float*)output_items[3];
+ }
if (d_updated) {
d_updated = false;
if (d_updated) {
d_updated = false;
@@
-230,9
+233,6
@@
gr_pfb_clock_sync_ccf::general_work (int noutput_items,
out[i] = d_filters[filtnum]->filter(&in[count]);
error = (out[i] * d_diff_filters[filtnum]->filter(&in[count])).real();
out[i] = d_filters[filtnum]->filter(&in[count]);
error = (out[i] * d_diff_filters[filtnum]->filter(&in[count])).real();
- if(ninput_items.size() == 2)
- err[i] = error;
-
d_k = d_k + d_alpha*error + d_rate;
d_rate = d_rate + d_beta*error;
while(d_k >= d_nfilters) {
d_k = d_k + d_alpha*error + d_rate;
d_rate = d_rate + d_beta*error;
while(d_k >= d_nfilters) {
@@
-247,8
+247,14
@@
gr_pfb_clock_sync_ccf::general_work (int noutput_items,
i++;
count += d_sps;
i++;
count += d_sps;
- printf("error: %f k: %f rate: %f\n",
- error, d_k, d_rate);
+ if(output_items.size() > 2) {
+ err[i] = error;
+ outrate[i] = d_rate;
+ outk[i] = d_k;
+ }
+
+ //printf("error: %f k: %f rate: %f\n",
+ // error, d_k, d_rate);
}
// Set the start index at the next entrance to the work function
}
// Set the start index at the next entrance to the work function