From 9f966c1f5123de5a16c810c52c2895ba0db8e2dc Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 9 Feb 2010 12:27:30 -0800 Subject: [PATCH] Arbitrary bit rates seems to be working. --- gnuradio-examples/python/digital/benchmark_qt_rx2.py | 11 +++++------ gnuradio-examples/python/digital/usrp_receive_path.py | 11 +---------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/gnuradio-examples/python/digital/benchmark_qt_rx2.py b/gnuradio-examples/python/digital/benchmark_qt_rx2.py index cabbecb6..d6338f85 100755 --- a/gnuradio-examples/python/digital/benchmark_qt_rx2.py +++ b/gnuradio-examples/python/digital/benchmark_qt_rx2.py @@ -33,7 +33,7 @@ import sys # from current dir from receive_path import receive_path -from pick_bitrate import pick_rx_bitrate +from pick_bitrate2 import pick_rx_bitrate try: from gnuradio.qtgui import qtgui @@ -242,8 +242,8 @@ class my_top_block(gr.top_block): # Connect to the QT sinks # FIXME: make better exposure to receiver from rxpath - #self.receiver = self.rxpath.packet_receiver._demodulator.phase_recov - self.receiver = self.rxpath.packet_receiver._demodulator.freq_recov + self.receiver = self.rxpath.packet_receiver._demodulator.phase_recov + #self.receiver = self.rxpath.packet_receiver._demodulator.freq_recov self.connect(self.u, self.snk_rxin) self.connect(self.receiver, self.snk_rx) @@ -267,9 +267,8 @@ class my_top_block(gr.top_block): self.u.set_decim(self._decim) (self._bitrate, self._samples_per_symbol, self._decim) = \ - pick_rx_bitrate(self._bitrate, self._demod_class.bits_per_symbol(), \ - self._samples_per_symbol, self._decim, adc_rate, \ - self.u.get_decim_rates()) + pick_rx_bitrate(options.bitrate, self._demod_class.bits_per_symbol(), \ + adc_rate, self.u.get_decim_rates()) self.u.set_decim(self._decim) self.set_auto_tr(True) # enable Auto Transmit/Receive switching diff --git a/gnuradio-examples/python/digital/usrp_receive_path.py b/gnuradio-examples/python/digital/usrp_receive_path.py index 1375a234..c7b70fb2 100644 --- a/gnuradio-examples/python/digital/usrp_receive_path.py +++ b/gnuradio-examples/python/digital/usrp_receive_path.py @@ -69,12 +69,8 @@ class usrp_receive_path(gr.hier_block2): if not attr.startswith('_') and not hasattr(self, attr): setattr(self, attr, getattr(rx_path, attr)) - # Set up resampler based on rate determined by _setup_usrp_source - rs_taps = gr.firdes.low_pass_2(32, 32, 0.45, 0.1, 60) - self.resampler = gr.pfb_arb_resampler_ccf(self.rs_rate, rs_taps) - #connect - self.connect(self.u, self.resampler, rx_path) + self.connect(self.u, rx_path) def _setup_usrp_source(self, options): self.u = usrp_options.create_usrp_source(options) @@ -83,11 +79,6 @@ class usrp_receive_path(gr.hier_block2): if options.verbose: print 'USRP Source:', self.u - - #(self._bitrate, self._samples_per_symbol, self._decim) = \ - # pick_rx_bitrate(options.bitrate, self._demod_class.bits_per_symbol(), \ - # options.samples_per_symbol, options.decim, adc_rate, \ - # self.u.get_decim_rates()) (self._bitrate, self._samples_per_symbol, self._decim) = \ pick_rx_bitrate(options.bitrate, self._demod_class.bits_per_symbol(), \ adc_rate, self.u.get_decim_rates()) -- 2.30.2