Cleaning up unused variable and code.
authorTom <trondeau@vt.edu>
Fri, 9 Oct 2009 21:02:04 +0000 (14:02 -0700)
committerTom <trondeau@vt.edu>
Fri, 9 Oct 2009 21:02:04 +0000 (14:02 -0700)
gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc
gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h

index fcd36860139d8f874368b3d78a81a8a7fefc9030..bfbbf8b8b49c3c726837dcbc0e63453494ae3b54 100644 (file)
@@ -56,7 +56,7 @@ gr_pfb_clock_sync_ccf::gr_pfb_clock_sync_ccf (double sps, float gain,
              gr_make_io_signature (1, 1, sizeof(gr_complex)),
              gr_make_io_signaturev (1, 4, iosig)),
     d_updated (false), d_nfilters(filter_size),
-    d_max_dev(max_rate_deviation), d_start_count(0)
+    d_max_dev(max_rate_deviation)
 {
   d_nfilters = filter_size;
   d_sps = floor(sps);
@@ -69,7 +69,6 @@ gr_pfb_clock_sync_ccf::gr_pfb_clock_sync_ccf (double sps, float gain,
   set_beta(0.25*gain*gain);
   d_k = d_nfilters / 2;
   d_rate = (sps-floor(sps))*(double)d_nfilters;
-  printf("RATE: %f\n", d_rate);
   d_filtnum = (int)floor(d_k);
 
   d_filters = std::vector<gr_fir_ccf*>(d_nfilters);
@@ -237,7 +236,7 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items,
   // We need this many to process one output
   int nrequired = ninput_items[0] - d_taps_per_filter;
 
-  int i = 0, count = (int)floor(d_sample_num);
+  int i = 0, count = 0;
   float error, error_r, error_i;
 
   // produce output as long as we can and there are enough input samples
@@ -258,13 +257,11 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items,
     while(d_filtnum >= d_nfilters) {
       d_k -= d_nfilters;
       d_filtnum -= d_nfilters;
-      //d_sample_num += 1.0;
       count += 1;
     }
     while(d_filtnum < 0) {
       d_k += d_nfilters;
       d_filtnum += d_nfilters;
-      //d_sample_num -= 1.0;
       count -= 1;
     }
     
@@ -272,8 +269,6 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items,
     d_rate = gr_branchless_clip(d_rate, d_max_dev);
 
     i++;
-    //d_sample_num += d_sps;
-    //count = (int)floor(d_sample_num);
     count += (int)floor(d_sps);
 
     if(output_items.size() > 2) {
@@ -282,23 +277,6 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items,
       outk[i] = d_k;
     }
   }
-
-  // Set the start index at the next entrance to the work function
-  // if we stop because we run out of input items, jump ahead in the
-  // next call to work. Otherwise, we can start at zero.
-  /*
-  if(count > nrequired) {
-    //d_start_count = count - (nrequired);
-    d_sample_num -= nrequired;
-    consume_each(ninput_items[0]-d_taps_per_filter);
-  }
-  else {
-    d_sample_num -= floor(d_sample_num);
-    consume_each(count);
-  }
-  */
-  //d_sample_num -= floor(d_sample_num);
-  d_sample_num = 0;
   consume_each(count);
 
   return i;
index 73bd7d6e6cb45854951ab19dcb3eccbc2b9ed537..778db59e5b8b94ddb2f54eeb53df3b3fde5bce5e 100644 (file)
@@ -72,7 +72,6 @@ class gr_pfb_clock_sync_ccf : public gr_block
   float                    d_max_dev;
   int                      d_filtnum;
   int                      d_taps_per_filter;
-  unsigned int             d_start_count;
 
   /*!
    * Build the polyphase filterbank timing synchronizer.