diff options
Diffstat (limited to 'grc/data')
7 files changed, 63 insertions, 78 deletions
diff --git a/grc/data/platforms/python/block_tree.xml b/grc/data/platforms/python/block_tree.xml index a234001d8..5e2d8f50c 100644 --- a/grc/data/platforms/python/block_tree.xml +++ b/grc/data/platforms/python/block_tree.xml @@ -241,7 +241,6 @@ <block>gr_probe_avg_mag_sqrd_x</block> <block>gr_probe_density_b</block> <block>gr_probe_mpsk_snr_c</block> - <block>gr_probe_signal_f</block> </cat> <cat> <name>USRP</name> diff --git a/grc/data/platforms/python/blocks/Makefile.am b/grc/data/platforms/python/blocks/Makefile.am index 2d4eec56c..1e4d3f7fc 100644 --- a/grc/data/platforms/python/blocks/Makefile.am +++ b/grc/data/platforms/python/blocks/Makefile.am @@ -141,7 +141,6 @@ dist_ourdata_DATA = \ gr_probe_avg_mag_sqrd_x.xml \ gr_probe_density_b.xml \ gr_probe_mpsk_snr_c.xml \ - gr_probe_signal_f.xml \ gr_pwr_squelch_xx.xml \ gr_quadrature_demod_cf.xml \ gr_rational_resampler_base_xxx.xml \ diff --git a/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml b/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml index cbd8446cd..eb855956a 100644 --- a/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml +++ b/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml @@ -7,19 +7,15 @@ <block> <name>Probe Avg Mag^2</name> <key>gr_probe_avg_mag_sqrd_x</key> - <import>from gnuradio import gr</import> - <import>import threading</import> - <import>import time</import> - <make>gr.probe_avg_mag_sqrd_$(type)($threshold, $alpha) -def _$(id)_run(): - while True: - time.sleep($update_interval) - print "$(id) Level:", self.$(id).level() -_$(id)_thread = threading.Thread(target=_$(id)_run) -_$(id)_thread.setDaemon(True) -_$(id)_thread.start()</make> + <import>from grc_gnuradio import blks2 as grc_blks2</import> + <make>grc_blks2.probe_avg_mag_sqrd_$(type)( + threshold=$threshold, + alpha=$alpha, + probe_rate=$probe_rate, +)</make> <callback>set_alpha($alpha)</callback> <callback>set_threshold($threshold)</callback> + <callback>set_probe_rate($probe_rate)</callback> <param> <name>Type</name> <key>type</key> @@ -38,21 +34,27 @@ _$(id)_thread.start()</make> <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> <param> - <name>Update Interval (s)</name> - <key>update_interval</key> - <value>1.0</value> + <name>Probe Rate</name> + <key>probe_rate</key> + <value>10</value> <type>real</type> </param> <sink> <name>in</name> <type>$type.input</type> </sink> + <source> + <name>out</name> + <type>float</type> + </source> </block> diff --git a/grc/data/platforms/python/blocks/gr_probe_density_b.xml b/grc/data/platforms/python/blocks/gr_probe_density_b.xml index 4c5b9e2fa..74d3b0a2b 100644 --- a/grc/data/platforms/python/blocks/gr_probe_density_b.xml +++ b/grc/data/platforms/python/blocks/gr_probe_density_b.xml @@ -7,31 +7,31 @@ <block> <name>Probe Density</name> <key>gr_probe_density_b</key> - <import>from gnuradio import gr</import> - <import>import threading</import> - <import>import time</import> - <make>gr.probe_density_b($alpha) -def _$(id)_run(): - while True: - time.sleep($update_interval) - print "$(id) Density:", self.$(id).density() -_$(id)_thread = threading.Thread(target=_$(id)_run) -_$(id)_thread.setDaemon(True) -_$(id)_thread.start()</make> + <import>from grc_gnuradio import blks2 as grc_blks2</import> + <make>grc_blks2.probe_density_b( + alpha=$alpha, + probe_rate=$probe_rate, +)</make> <callback>set_alpha($alpha)</callback> + <callback>set_probe_rate($probe_rate)</callback> <param> <name>Alpha</name> <key>alpha</key> + <value>1</value> <type>real</type> </param> <param> - <name>Update Interval (s)</name> - <key>update_interval</key> - <value>1.0</value> + <name>Probe Rate</name> + <key>probe_rate</key> + <value>10</value> <type>real</type> </param> <sink> <name>in</name> <type>byte</type> </sink> + <source> + <name>out</name> + <type>float</type> + </source> </block> diff --git a/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml b/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml index ec80d092d..655eb7c0d 100644 --- a/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml +++ b/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml @@ -7,33 +7,49 @@ <block> <name>Probe MPSK SNR</name> <key>gr_probe_mpsk_snr_c</key> - <import>from gnuradio import gr</import> - <import>import threading</import> - <import>import time</import> - <make>gr.probe_mpsk_snr_c($alpha) -def _$(id)_run(): - while True: - time.sleep($update_interval) - print "$(id) Signal Mean:", self.$(id).signal_mean() - print "$(id) Noise Variance:", self.$(id).noise_variance() - print "$(id) SNR:", self.$(id).snr() -_$(id)_thread = threading.Thread(target=_$(id)_run) -_$(id)_thread.setDaemon(True) -_$(id)_thread.start()</make> + <import>from grc_gnuradio import blks2 as grc_blks2</import> + <make>grc_blks2.probe_mpsk_snr_c( + type="$type", + alpha=$alpha, + probe_rate=$probe_rate, +)</make> <callback>set_alpha($alpha)</callback> + <callback>set_probe_rate($probe_rate)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>SNR</name> + <key>snr</key> + </option> + <option> + <name>Signal Mean</name> + <key>signal_mean</key> + </option> + <option> + <name>Noise Variance</name> + <key>noise_variance</key> + </option> + </param> <param> <name>Alpha</name> <key>alpha</key> + <value>1</value> <type>real</type> </param> <param> - <name>Update Interval (s)</name> - <key>update_interval</key> - <value>1.0</value> + <name>Probe Rate</name> + <key>probe_rate</key> + <value>10</value> <type>real</type> </param> <sink> <name>in</name> <type>complex</type> </sink> + <source> + <name>out</name> + <type>float</type> + </source> </block> diff --git a/grc/data/platforms/python/blocks/gr_probe_signal_f.xml b/grc/data/platforms/python/blocks/gr_probe_signal_f.xml deleted file mode 100644 index 688887f47..000000000 --- a/grc/data/platforms/python/blocks/gr_probe_signal_f.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Probe Signal -################################################### - --> -<block> - <name>Probe Signal</name> - <key>gr_probe_signal_f</key> - <import>from gnuradio import gr</import> - <import>import threading</import> - <import>import time</import> - <make>gr.probe_signal_f() -def _$(id)_run(): - while True: - time.sleep($update_interval) - print "$(id) Level:", self.$(id).level() -_$(id)_thread = threading.Thread(target=_$(id)_run) -_$(id)_thread.setDaemon(True) -_$(id)_thread.start()</make> - <param> - <name>Update Interval (s)</name> - <key>update_interval</key> - <value>1.0</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>float</type> - </sink> -</block> diff --git a/grc/data/platforms/python/blocks/wxgui_numbersink2.xml b/grc/data/platforms/python/blocks/wxgui_numbersink2.xml index e54da3e61..c3a8c52bd 100644 --- a/grc/data/platforms/python/blocks/wxgui_numbersink2.xml +++ b/grc/data/platforms/python/blocks/wxgui_numbersink2.xml @@ -102,7 +102,7 @@ self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos <param> <name>Reference Level</name> <key>ref_level</key> - <value>50</value> + <value>0</value> <type>real</type> </param> <param> |