diff options
author | Marcus Müller <marcus@hostalia.de> | 2018-08-31 23:02:22 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-08-31 23:02:22 +0200 |
commit | 254fe5e89403d4de1fa6663d09efdf946996aff3 (patch) | |
tree | 62877d7ac7fdedf6c397c51e22ac6f97eba97ddf /gr-analog/lib/pll_freqdet_cf_impl.cc | |
parent | 896d1c9da31963ecf5b0d90942c2af51ca998a69 (diff) | |
parent | 5ad935c3a3dd46ce2860b13e2b774e4841784616 (diff) |
Merge remote-tracking branch 'origin/next' into merge_next
Diffstat (limited to 'gr-analog/lib/pll_freqdet_cf_impl.cc')
-rw-r--r-- | gr-analog/lib/pll_freqdet_cf_impl.cc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gr-analog/lib/pll_freqdet_cf_impl.cc b/gr-analog/lib/pll_freqdet_cf_impl.cc index 42caa0bfd5..46c9a9f954 100644 --- a/gr-analog/lib/pll_freqdet_cf_impl.cc +++ b/gr-analog/lib/pll_freqdet_cf_impl.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004,2010,2011 Free Software Foundation, Inc. + * Copyright 2004,2010,2011,2018 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -26,16 +26,13 @@ #include "pll_freqdet_cf_impl.h" #include <gnuradio/io_signature.h> -#include <math.h> #include <gnuradio/math.h> +#include <cmath> + namespace gr { namespace analog { -#ifndef M_TWOPI -#define M_TWOPI (2.0f*M_PI) -#endif - pll_freqdet_cf::sptr pll_freqdet_cf::make(float loop_bw, float max_freq, float min_freq) { @@ -58,10 +55,10 @@ namespace gr { float pll_freqdet_cf_impl::mod_2pi(float in) { - if(in > M_PI) - return in - M_TWOPI; - else if(in < -M_PI) - return in + M_TWOPI; + if(in > GR_M_PI) + return in - GR_M_TWOPI; + else if(in < -GR_M_PI) + return in + GR_M_TWOPI; else return in; } |