summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r--gnuradio-core/src/lib/general/gr_cpm.cc3
-rw-r--r--gnuradio-core/src/lib/general/gr_cpm.h4
-rw-r--r--gnuradio-core/src/lib/general/gr_cpm.i2
-rw-r--r--gnuradio-core/src/lib/general/qa_gr_cpm.cc2
-rw-r--r--gnuradio-core/src/lib/hier/gr_cpmmod_bc.cc2
5 files changed, 5 insertions, 8 deletions
diff --git a/gnuradio-core/src/lib/general/gr_cpm.cc b/gnuradio-core/src/lib/general/gr_cpm.cc
index f2d032a22..a00526b52 100644
--- a/gnuradio-core/src/lib/general/gr_cpm.cc
+++ b/gnuradio-core/src/lib/general/gr_cpm.cc
@@ -28,6 +28,9 @@
#include <cfloat>
#include <gr_cpm.h>
+#ifndef M_TWOPI
+# define M_TWOPI (2*M_PI)
+#endif
//! Normalised sinc function, sinc(x)=sin(pi*x)/pi*x
inline double
diff --git a/gnuradio-core/src/lib/general/gr_cpm.h b/gnuradio-core/src/lib/general/gr_cpm.h
index 09598024a..cae6fe313 100644
--- a/gnuradio-core/src/lib/general/gr_cpm.h
+++ b/gnuradio-core/src/lib/general/gr_cpm.h
@@ -24,10 +24,6 @@
#include <vector>
-#ifndef M_TWOPI
-# define M_TWOPI (2*M_PI)
-#endif
-
class gr_cpm
{
public:
diff --git a/gnuradio-core/src/lib/general/gr_cpm.i b/gnuradio-core/src/lib/general/gr_cpm.i
index 7145f5edd..f01aba34e 100644
--- a/gnuradio-core/src/lib/general/gr_cpm.i
+++ b/gnuradio-core/src/lib/general/gr_cpm.i
@@ -34,7 +34,7 @@ class gr_cpm
GENERIC = 999
};
- std::vector<float>
+ static std::vector<float>
phase_response(cpm_type type, unsigned samples_per_sym, unsigned L, double beta=0.3);
};
diff --git a/gnuradio-core/src/lib/general/qa_gr_cpm.cc b/gnuradio-core/src/lib/general/qa_gr_cpm.cc
index ae391c48c..cc32d1117 100644
--- a/gnuradio-core/src/lib/general/qa_gr_cpm.cc
+++ b/gnuradio-core/src/lib/general/qa_gr_cpm.cc
@@ -135,8 +135,6 @@ qa_gr_cpm::t5 ()
sum += taps[i];
}
- // Need to cut this guy some slack; in theory, sum only equals one for
- // L => infinity
CPPUNIT_ASSERT_DOUBLES_EQUAL(sum, 1.0, DELTA);
}
diff --git a/gnuradio-core/src/lib/hier/gr_cpmmod_bc.cc b/gnuradio-core/src/lib/hier/gr_cpmmod_bc.cc
index d14deee34..24c25e22f 100644
--- a/gnuradio-core/src/lib/hier/gr_cpmmod_bc.cc
+++ b/gnuradio-core/src/lib/hier/gr_cpmmod_bc.cc
@@ -42,7 +42,7 @@ gr_cpmmod_bc::gr_cpmmod_bc(gr_cpm::cpm_type type, float h, unsigned samples_per_
d_taps(gr_cpm::phase_response(type, samples_per_sym, L, beta)),
d_char_to_float(gr_make_char_to_float()),
d_pulse_shaper(gr_make_interp_fir_filter_fff(samples_per_sym, d_taps)),
- d_fm(gr_make_frequency_modulator_fc(M_TWOPI * h / samples_per_sym))
+ d_fm(gr_make_frequency_modulator_fc(M_PI * h))
{
switch (type) {
case gr_cpm::LRC: