summaryrefslogtreecommitdiff
path: root/grc
diff options
context:
space:
mode:
Diffstat (limited to 'grc')
-rw-r--r--grc/blocks/Makefile.am1
-rw-r--r--grc/blocks/block_tree.xml5
-rw-r--r--grc/blocks/gr_pfb_clock_sync.xml53
-rw-r--r--grc/blocks/options.xml29
-rw-r--r--grc/gui/PropsDialog.py11
-rw-r--r--grc/python/flow_graph.tmpl5
6 files changed, 90 insertions, 14 deletions
diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am
index 617a3bf60..7c769c4b4 100644
--- a/grc/blocks/Makefile.am
+++ b/grc/blocks/Makefile.am
@@ -144,6 +144,7 @@ dist_ourdata_DATA = \
gr_packed_to_unpacked_xx.xml \
gr_peak_detector2_fb.xml \
gr_peak_detector_xb.xml \
+ gr_pfb_clock_sync.xml \
gr_phase_modulator_fc.xml \
gr_pll_carriertracking_cc.xml \
gr_pll_freqdet_cf.xml \
diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml
index 296f0ee91..509956d3b 100644
--- a/grc/blocks/block_tree.xml
+++ b/grc/blocks/block_tree.xml
@@ -124,6 +124,7 @@
<cat>
<name>Synchronizers</name>
<block>gr_clock_recovery_mm_xx</block>
+ <block>gr_pfb_clock_sync_ccf</block>
<block>gr_costas_loop_cc</block>
<block>gr_dd_mpsk_sync_cc</block>
@@ -167,7 +168,7 @@
<block>band_pass_filter</block>
<block>band_reject_filter</block>
<block>root_raised_cosine_filter</block>
- <!-- Filters that take taps as aruments -->
+ <!-- Filters that take taps as arguments -->
<block>gr_fir_filter_xxx</block>
<block>gr_interp_fir_filter_xxx</block>
<block>gr_fft_filter_xxx</block>
@@ -178,7 +179,7 @@
<!-- Filter banks -->
<block>blks2_synthesis_filterbank</block>
<block>blks2_analysis_filterbank</block>
- <!-- Polyphase filers -->
+ <!-- Polyphase filters -->
<block>blks2_pfb_arb_resampler_ccf</block>
<!-- Other filters -->
<block>gr_single_pole_iir_filter_xx</block>
diff --git a/grc/blocks/gr_pfb_clock_sync.xml b/grc/blocks/gr_pfb_clock_sync.xml
new file mode 100644
index 000000000..9e2f3fa9c
--- /dev/null
+++ b/grc/blocks/gr_pfb_clock_sync.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## Polyphase Filter based Clock Sync
+###################################################
+ -->
+<block>
+ <name>Polyphase Clock Sync</name>
+ <key>gr_pfb_clock_sync_ccf</key>
+ <import>from gnuradio import gr</import>
+ <make>gr.pfb_clock_sync_ccf($sps, $gain, $taps, $filter_size, $init_phase)</make>
+ <callback>set_taps($taps)</callback>
+ <callback>set_gain($gain)</callback>
+
+ <param>
+ <name>Samples/Symbol</name>
+ <key>sps</key>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Gain</name>
+ <key>gain</key>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Taps</name>
+ <key>taps</key>
+ <type>real_vector</type>
+ </param>
+ <param>
+ <name>Filter Size</name>
+ <key>filter_size</key>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Initial Phase</name>
+ <key>init_phase</key>
+ <type>real</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+ <source>
+ <name>err</name>
+ <type>float</type>
+ <optional>1</optional>
+ </source>
+</block>
diff --git a/grc/blocks/options.xml b/grc/blocks/options.xml
index 1798a69f8..4d0dd2899 100644
--- a/grc/blocks/options.xml
+++ b/grc/blocks/options.xml
@@ -78,19 +78,36 @@ else: self.stop(); self.wait()</callback>
<hide>#if $generate_options() == 'hb' then 'none' else 'all'#</hide>
</param>
<param>
+ <name>Run Options</name>
+ <key>run_options</key>
+ <value>prompt</value>
+ <type>enum</type>
+ <hide>#if $generate_options() == 'no_gui' then 'none' else 'all'#</hide>
+ <option>
+ <name>Run to Completion</name>
+ <key>run</key>
+ </option>
+ <option>
+ <name>Prompt for Exit</name>
+ <key>prompt</key>
+ </option>
+ </param>
+ <param>
<name>Run</name>
<key>run</key>
<value>True</value>
<type>bool</type>
- <hide>#if $generate_options() == 'wx_gui'
- #if str($run) == 'True'
-part#slurp
+ <hide>
+#if $generate_options() == 'wx_gui'
+ #if $run()
+ part
#else
-none#slurp
+ none
#end if
#else
-all#slurp
-#end if</hide>
+ all
+#end if
+ </hide>
<option>
<name>Autostart</name>
<key>True</key>
diff --git a/grc/gui/PropsDialog.py b/grc/gui/PropsDialog.py
index a7822b228..cc84fd088 100644
--- a/grc/gui/PropsDialog.py
+++ b/grc/gui/PropsDialog.py
@@ -93,15 +93,14 @@ class PropsDialog(gtk.Dialog):
Ex: Added, removed, type change, hide change...
To the props dialog, the hide setting of 'none' and 'part' are identical.
Therfore, the props dialog only cares if the hide setting is/not 'all'.
- Make a hash that uniquely represents the params state.
+ Make a hash that uniquely represents the params' state.
@return true if changed
"""
old_hash = self._hash
- self._hash = 0
- for param in self._block.get_params():
- self._hash ^= hash(param)
- self._hash ^= hash(param.get_type())
- self._hash ^= hash(param.get_hide() == 'all')
+ #create a tuple of things from each param that affects the params box
+ self._hash = hash(tuple([(
+ hash(param), param.get_type(), param.get_hide() == 'all',
+ ) for param in self._block.get_params()]))
return self._hash != old_hash
def _handle_changed(self, *args):
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl
index dce4037d5..31d99a61c 100644
--- a/grc/python/flow_graph.tmpl
+++ b/grc/python/flow_graph.tmpl
@@ -233,9 +233,14 @@ if __name__ == '__main__':
#if $generate_options == 'wx_gui'
tb.Run($flow_graph.get_option('run'))
#elif $generate_options == 'no_gui'
+ #set $run_options = $flow_graph.get_option('run_options')
+ #if $run_options == 'prompt'
tb.start()
raw_input('Press Enter to quit: ')
tb.stop()
+ #elif $run_options == 'run'
+ tb.run()
+ #end if
#end if
#end if