diff options
Diffstat (limited to 'gr-digital/lib/clock_recovery_mm_cc_impl.h')
-rw-r--r-- | gr-digital/lib/clock_recovery_mm_cc_impl.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/gr-digital/lib/clock_recovery_mm_cc_impl.h b/gr-digital/lib/clock_recovery_mm_cc_impl.h index cb444020c3..79402f5896 100644 --- a/gr-digital/lib/clock_recovery_mm_cc_impl.h +++ b/gr-digital/lib/clock_recovery_mm_cc_impl.h @@ -61,8 +61,26 @@ private: gr_complex d_p_2T, d_p_1T, d_p_0T; gr_complex d_c_2T, d_c_1T, d_c_0T; - gr_complex slicer_0deg(gr_complex sample); - gr_complex slicer_45deg(gr_complex sample); + gr_complex slicer_0deg(gr_complex sample) + { + float real = 0.0f, imag = 0.0f; + + if (sample.real() > 0.0f) + real = 1.0f; + if (sample.imag() > 0.0f) + imag = 1.0f; + return gr_complex(real, imag); + } + + gr_complex slicer_45deg(gr_complex sample) + { + float real = -1.0f, imag = -1.0f; + if (sample.real() > 0.0f) + real = 1.0f; + if (sample.imag() > 0.0f) + imag = 1.0f; + return gr_complex(real, imag); + } }; } /* namespace digital */ |