diff options
author | Tom Rondeau | 2011-08-09 20:55:47 -0400 |
---|---|---|
committer | Tom Rondeau | 2011-08-09 20:57:30 -0400 |
commit | 386a73c53aeb36bdf10e28fc5366385faebe78b2 (patch) | |
tree | 4d6044b4c0c3bd276c28b6ca476ca634acbc49dd /gr-digital | |
parent | 594cc158335fe4b25c251fe4698ccb6a35ed170f (diff) | |
download | gnuradio-386a73c53aeb36bdf10e28fc5366385faebe78b2.tar.gz gnuradio-386a73c53aeb36bdf10e28fc5366385faebe78b2.tar.bz2 gnuradio-386a73c53aeb36bdf10e28fc5366385faebe78b2.zip |
digital: fixed complex M&M to output the error signal as a float. Also changed the error value limit since we were hitting it constantly before.
Diffstat (limited to 'gr-digital')
-rw-r--r-- | gr-digital/lib/digital_clock_recovery_mm_cc.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gr-digital/lib/digital_clock_recovery_mm_cc.cc b/gr-digital/lib/digital_clock_recovery_mm_cc.cc index 2984afd6c..198eb4b89 100644 --- a/gr-digital/lib/digital_clock_recovery_mm_cc.cc +++ b/gr-digital/lib/digital_clock_recovery_mm_cc.cc @@ -52,7 +52,7 @@ digital_clock_recovery_mm_cc::digital_clock_recovery_mm_cc (float omega, float g float omega_relative_limit) : gr_block ("clock_recovery_mm_cc", gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 2, sizeof (gr_complex))), + gr_make_io_signature2 (1, 2, sizeof (gr_complex), sizeof(float))), d_mu (mu), d_omega(omega), d_gain_omega(gain_omega), d_omega_relative_limit(omega_relative_limit), d_gain_mu(gain_mu), d_last_sample(0), d_interp(new gri_mmse_fir_interpolator_cc()), @@ -121,7 +121,7 @@ digital_clock_recovery_mm_cc::general_work (int noutput_items, { const gr_complex *in = (const gr_complex *) input_items[0]; gr_complex *out = (gr_complex *) output_items[0]; - gr_complex *foptr = (gr_complex *) output_items[1]; + float *foptr = (float *) output_items[1]; bool write_foptr = output_items.size() >= 2; @@ -153,7 +153,7 @@ digital_clock_recovery_mm_cc::general_work (int noutput_items, out[oo++] = d_p_0T; // limit mm_val - mm_val = gr_branchless_clip(mm_val,1.0); + mm_val = gr_branchless_clip(mm_val,4.0); d_omega = d_omega + d_gain_omega * mm_val; d_omega = d_omega_mid + gr_branchless_clip(d_omega-d_omega_mid, d_omega_relative_limit); // make sure we don't walk away @@ -162,7 +162,7 @@ digital_clock_recovery_mm_cc::general_work (int noutput_items, d_mu -= floor(d_mu); // write the error signal to the second output - foptr[oo-1] = gr_complex(d_mu,0); + foptr[oo-1] = mm_val; if (ii < 0) // clamp it. This should only happen with bogus input ii = 0; |