diff options
Diffstat (limited to 'gr-filter')
-rwxr-xr-x | gr-filter/examples/gr_filtdes_live_upd.py | 3 | ||||
-rw-r--r-- | gr-filter/examples/resampler_demo.grc | 64 | ||||
-rwxr-xr-x | gr-filter/examples/synth_to_chan.py | 4 | ||||
-rw-r--r-- | gr-filter/lib/fir_filter_XXX_impl.cc.t | 3 |
4 files changed, 39 insertions, 35 deletions
diff --git a/gr-filter/examples/gr_filtdes_live_upd.py b/gr-filter/examples/gr_filtdes_live_upd.py index b21e381a46..52985119e0 100755 --- a/gr-filter/examples/gr_filtdes_live_upd.py +++ b/gr-filter/examples/gr_filtdes_live_upd.py @@ -22,6 +22,7 @@ from gnuradio.filter import filter_design from gnuradio import gr, filter +from gnuradio import blocks import sys try: @@ -70,7 +71,7 @@ class my_top_block(gr.top_block): src = blocks.add_cc() channel = channels.channel_model(0.01) self.filt = filter.fft_filter_ccc(1, self.filt_taps) - thr = gr.throttle(gr.sizeof_gr_complex, 100*npts) + thr = blocks.throttle(gr.sizeof_gr_complex, 100*npts) self.snk1 = qtgui.freq_sink_c(npts, filter.firdes.WIN_BLACKMAN_hARRIS, 0, Rs, "Complex Freq Example", 1) diff --git a/gr-filter/examples/resampler_demo.grc b/gr-filter/examples/resampler_demo.grc index 9c19cd7dcc..62ebdd34cd 100644 --- a/gr-filter/examples/resampler_demo.grc +++ b/gr-filter/examples/resampler_demo.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Sat Nov 10 14:47:16 2012</timestamp> + <timestamp>Sun Feb 24 19:43:22 2013</timestamp> <block> <key>options</key> <param> @@ -236,37 +236,6 @@ </param> </block> <block> - <key>gr_throttle</key> - <param> - <key>id</key> - <value>throttle</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>samples_per_second</key> - <value>samp_rate</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(227, 493)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>pfb_arb_resampler_xxx</key> <param> <key>id</key> @@ -607,6 +576,37 @@ <value>0</value> </param> </block> + <block> + <key>blocks_throttle</key> + <param> + <key>id</key> + <value>throttle</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>samples_per_second</key> + <value>samp_rate</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(227, 492)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> <connection> <source_block_id>adder</source_block_id> <sink_block_id>throttle</sink_block_id> diff --git a/gr-filter/examples/synth_to_chan.py b/gr-filter/examples/synth_to_chan.py index d1d2406458..5ea4d8ee47 100755 --- a/gr-filter/examples/synth_to_chan.py +++ b/gr-filter/examples/synth_to_chan.py @@ -53,7 +53,7 @@ def main(): sigs = list() fmtx = list() for fi in freqs: - s = analog.sig_source_f(fs, gr.GR_SIN_WAVE, fi, 1) + s = analog.sig_source_f(fs, analog.GR_SIN_WAVE, fi, 1) fm = analog.nbfm_tx(fs, 4*fs, max_dev=10000, tau=75e-6) sigs.append(s) fmtx.append(fm) @@ -69,7 +69,7 @@ def main(): noise_level = 0.01 head = gr.head(gr.sizeof_gr_complex, N) - noise = analog.noise_source_c(gr.GR_GAUSSIAN, noise_level) + noise = analog.noise_source_c(analog.GR_GAUSSIAN, noise_level) addnoise = blocks.add_cc() snk_synth = gr.vector_sink_c() diff --git a/gr-filter/lib/fir_filter_XXX_impl.cc.t b/gr-filter/lib/fir_filter_XXX_impl.cc.t index 529c51e2bb..319c267270 100644 --- a/gr-filter/lib/fir_filter_XXX_impl.cc.t +++ b/gr-filter/lib/fir_filter_XXX_impl.cc.t @@ -64,6 +64,7 @@ namespace gr { void @IMPL_NAME@::set_taps(const std::vector<@TAP_TYPE@> &taps) { + gruel::scoped_lock l(d_setlock); d_fir->set_taps(taps); d_updated = true; } @@ -79,6 +80,8 @@ namespace gr { gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { + gruel::scoped_lock l(d_setlock); + const @I_TYPE@ *in = (const @I_TYPE@*)input_items[0]; @O_TYPE@ *out = (@O_TYPE@*)output_items[0]; |