summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib
diff options
context:
space:
mode:
authorTom Rondeau2011-03-25 13:53:09 -0400
committerTom Rondeau2011-03-25 13:53:09 -0400
commit8cee6c5ffb0605273c8b73891851ba3f991b0622 (patch)
treea3bd421c8fddaec15484d4d653811974c8d5969a /gnuradio-core/src/lib
parent972fc99ad6984e50731ec0dd97ccfec71829139b (diff)
parent64dac6a1f62fb8484e879f0d20ee60bc02da179c (diff)
downloadgnuradio-8cee6c5ffb0605273c8b73891851ba3f991b0622.tar.gz
gnuradio-8cee6c5ffb0605273c8b73891851ba3f991b0622.tar.bz2
gnuradio-8cee6c5ffb0605273c8b73891851ba3f991b0622.zip
Merge branch 'master' of gnuradio.org:gnuradio
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r--gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.cc7
-rw-r--r--gnuradio-core/src/lib/io/gr_tagged_file_sink.cc1
-rw-r--r--gnuradio-core/src/lib/io/gr_tagged_file_sink.h1
-rw-r--r--gnuradio-core/src/lib/io/gr_wavfile_source.cc1
-rw-r--r--gnuradio-core/src/lib/io/gr_wavfile_source.h1
-rw-r--r--gnuradio-core/src/lib/runtime/gr_error_handler.cc1
-rw-r--r--gnuradio-core/src/lib/runtime/gr_error_handler.h1
7 files changed, 7 insertions, 6 deletions
diff --git a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.cc b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.cc
index e87d93ebf..ca76c8eb8 100644
--- a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.cc
+++ b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.cc
@@ -42,6 +42,7 @@ typedef gr_complex acc_type;
using std::vector;
+#define MAX_DATA (32767)
#define ERR_DELTA (1e-5)
#define NELEM(x) (sizeof (x) / sizeof (x[0]))
@@ -56,8 +57,8 @@ static void
random_complex (gr_complex *buf, unsigned n)
{
for (unsigned i = 0; i < n; i++){
- float re = rint (uniform () * 32767);
- float im = rint (uniform () * 32767);
+ float re = rint (uniform () * MAX_DATA);
+ float im = rint (uniform () * MAX_DATA);
buf[i] = gr_complex (re, im);
}
}
@@ -151,7 +152,7 @@ qa_gri_fir_filter_with_buffer_ccc::test_decimate(unsigned int decimate)
for (int o = 0; o < (int)(ol/decimate); o++){
CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected_output[o], actual_output[o],
- abs (expected_output[o]) * ERR_DELTA);
+ sqrt((float)n)*0.25*MAX_DATA*MAX_DATA * ERR_DELTA);
}
delete f1;
}
diff --git a/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc b/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc
index c76ede542..154611c32 100644
--- a/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc
+++ b/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc
@@ -26,7 +26,6 @@
#include <gr_tagged_file_sink.h>
#include <gr_io_signature.h>
-#include <cstdio>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/gnuradio-core/src/lib/io/gr_tagged_file_sink.h b/gnuradio-core/src/lib/io/gr_tagged_file_sink.h
index 956340f8d..2e0a5c63a 100644
--- a/gnuradio-core/src/lib/io/gr_tagged_file_sink.h
+++ b/gnuradio-core/src/lib/io/gr_tagged_file_sink.h
@@ -24,6 +24,7 @@
#define INCLUDED_GR_TAGGED_FILE_SINK_H
#include <gr_sync_block.h>
+#include <cstdio> // for FILE
class gr_tagged_file_sink;
typedef boost::shared_ptr<gr_tagged_file_sink> gr_tagged_file_sink_sptr;
diff --git a/gnuradio-core/src/lib/io/gr_wavfile_source.cc b/gnuradio-core/src/lib/io/gr_wavfile_source.cc
index d00dd3028..136e52611 100644
--- a/gnuradio-core/src/lib/io/gr_wavfile_source.cc
+++ b/gnuradio-core/src/lib/io/gr_wavfile_source.cc
@@ -27,7 +27,6 @@
#include <gr_wavfile_source.h>
#include <gr_io_signature.h>
#include <gri_wavfile.h>
-#include <cstdio>
#include <sys/types.h>
#include <fcntl.h>
#include <stdexcept>
diff --git a/gnuradio-core/src/lib/io/gr_wavfile_source.h b/gnuradio-core/src/lib/io/gr_wavfile_source.h
index 0c663f0a0..e434a6b4c 100644
--- a/gnuradio-core/src/lib/io/gr_wavfile_source.h
+++ b/gnuradio-core/src/lib/io/gr_wavfile_source.h
@@ -24,6 +24,7 @@
#define INCLUDED_GR_WAVFILE_SOURCE_H
#include <gr_sync_block.h>
+#include <cstdio> // for FILE
class gr_wavfile_source;
typedef boost::shared_ptr<gr_wavfile_source> gr_wavfile_source_sptr;
diff --git a/gnuradio-core/src/lib/runtime/gr_error_handler.cc b/gnuradio-core/src/lib/runtime/gr_error_handler.cc
index 6dbb0a5d2..4b4cdacef 100644
--- a/gnuradio-core/src/lib/runtime/gr_error_handler.cc
+++ b/gnuradio-core/src/lib/runtime/gr_error_handler.cc
@@ -48,7 +48,6 @@
#include <assert.h>
#include <stdexcept>
#include <unistd.h>
-#include <stdio.h>
#ifdef HAVE_IO_H
#include <io.h>
diff --git a/gnuradio-core/src/lib/runtime/gr_error_handler.h b/gnuradio-core/src/lib/runtime/gr_error_handler.h
index 530a2c23c..aedb6f41f 100644
--- a/gnuradio-core/src/lib/runtime/gr_error_handler.h
+++ b/gnuradio-core/src/lib/runtime/gr_error_handler.h
@@ -45,6 +45,7 @@
#include <stdarg.h>
#include <string>
+#include <cstdio> // for FILE
/*!
* \brief abstract error handler