summaryrefslogtreecommitdiff
path: root/gr-analog
diff options
context:
space:
mode:
Diffstat (limited to 'gr-analog')
-rw-r--r--gr-analog/grc/analog_block_tree.xml4
-rw-r--r--gr-analog/grc/analog_probe_avg_mag_sqrd_x.xml50
-rw-r--r--gr-analog/include/analog/frequency_modulator_fc.h4
-rw-r--r--gr-analog/lib/CMakeLists.txt2
-rw-r--r--gr-analog/python/CMakeLists.txt18
5 files changed, 67 insertions, 11 deletions
diff --git a/gr-analog/grc/analog_block_tree.xml b/gr-analog/grc/analog_block_tree.xml
index 99255d759..b5b2ecd56 100644
--- a/gr-analog/grc/analog_block_tree.xml
+++ b/gr-analog/grc/analog_block_tree.xml
@@ -57,4 +57,8 @@
<block>analog_pll_freqdet_cf</block>
<block>analog_pll_refout_cc</block>
</cat>
+ <cat>
+ <name>Probes</name>
+ <block>analog_probe_avg_mag_sqrd_x</block>
+ </cat>
</cat>
diff --git a/gr-analog/grc/analog_probe_avg_mag_sqrd_x.xml b/gr-analog/grc/analog_probe_avg_mag_sqrd_x.xml
new file mode 100644
index 000000000..b05ac6d0d
--- /dev/null
+++ b/gr-analog/grc/analog_probe_avg_mag_sqrd_x.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Probe Average Magnitude Squared
+###################################################
+ -->
+<block>
+ <name>Probe Avg Mag^2</name>
+ <key>analog_probe_avg_mag_sqrd_x</key>
+ <import>from gnuradio import analog</import>
+ <make>analog.probe_avg_mag_sqrd_$(type)($threshold, $alpha)</make>
+ <callback>set_alpha($alpha)</callback>
+ <callback>set_threshold($threshold)</callback>
+ <param>
+ <name>Type</name>
+ <key>type</key>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>c</key>
+ <opt>input:complex</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>f</key>
+ <opt>input:float</opt>
+ </option>
+ </param>
+ <param>
+ <name>Threshold (dB)</name>
+ <key>threshold</key>
+ <value>0</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Alpha</name>
+ <key>alpha</key>
+ <value>1</value>
+ <type>real</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>$type.input</type>
+ </sink>
+ <doc>
+Available functions to probe: level()
+
+Use with the function probe block.
+ </doc>
+</block>
diff --git a/gr-analog/include/analog/frequency_modulator_fc.h b/gr-analog/include/analog/frequency_modulator_fc.h
index b163bac94..8706d513a 100644
--- a/gr-analog/include/analog/frequency_modulator_fc.h
+++ b/gr-analog/include/analog/frequency_modulator_fc.h
@@ -20,8 +20,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef INCLUDED_ANALOOG_FREQUENCY_MODULATOR_FC_H
-#define INCLUDED_ANALOOG_FREQUENCY_MODULATOR_FC_H
+#ifndef INCLUDED_ANALOG_FREQUENCY_MODULATOR_FC_H
+#define INCLUDED_ANALOG_FREQUENCY_MODULATOR_FC_H
#include <analog/api.h>
#include <gr_sync_block.h>
diff --git a/gr-analog/lib/CMakeLists.txt b/gr-analog/lib/CMakeLists.txt
index aaf3c8656..653d5be27 100644
--- a/gr-analog/lib/CMakeLists.txt
+++ b/gr-analog/lib/CMakeLists.txt
@@ -173,6 +173,8 @@ if(ENABLE_TESTING)
${CPPUNIT_LIBRARIES}
)
+ list(APPEND GR_TEST_TARGET_DEPS gnuradio-analog gnuradio-filter gnuradio-fft)
+
GR_ADD_TEST(test_gr_analog test-gr-analog)
endif(ENABLE_TESTING)
diff --git a/gr-analog/python/CMakeLists.txt b/gr-analog/python/CMakeLists.txt
index 08570eea3..1657e5bf3 100644
--- a/gr-analog/python/CMakeLists.txt
+++ b/gr-analog/python/CMakeLists.txt
@@ -33,19 +33,19 @@ GR_PYTHON_INSTALL(
# Handle the unit tests
########################################################################
if(ENABLE_TESTING)
+
+list(APPEND GR_TEST_PYTHON_DIRS
+ ${CMAKE_BINARY_DIR}/gr-analog/python
+ ${CMAKE_BINARY_DIR}/gr-analog/swig
+ ${CMAKE_BINARY_DIR}/gr-filter/python
+ ${CMAKE_BINARY_DIR}/gr-filter/swig
+)
+list(APPEND GR_TEST_TARGET_DEPS gnuradio-analog gnuradio-filter gnuradio-fft)
+
include(GrTest)
file(GLOB py_qa_test_files "qa_*.py")
foreach(py_qa_test_file ${py_qa_test_files})
get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
- set(GR_TEST_PYTHON_DIRS
- ${CMAKE_BINARY_DIR}/gnuradio-core/src/python
- ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig
- ${CMAKE_BINARY_DIR}/gr-analog/python
- ${CMAKE_BINARY_DIR}/gr-analog/swig
- ${CMAKE_BINARY_DIR}/gr-filter/python
- ${CMAKE_BINARY_DIR}/gr-filter/swig
- )
- set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core gnuradio-analog)
GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
endforeach(py_qa_test_file)
endif(ENABLE_TESTING)