From: Tom Rondeau Date: Fri, 26 Feb 2010 14:58:39 +0000 (-0500) Subject: Fixes pick_bitrate2 for use on receiver side. X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=93c51f5c02311f89dc6eb47923b34b13038c805c;p=debian%2Fgnuradio Fixes pick_bitrate2 for use on receiver side. --- diff --git a/gnuradio-examples/python/digital/receive_path.py b/gnuradio-examples/python/digital/receive_path.py index 7aeeedab..7df945ed 100644 --- a/gnuradio-examples/python/digital/receive_path.py +++ b/gnuradio-examples/python/digital/receive_path.py @@ -119,7 +119,7 @@ class receive_path(gr.hier_block2): normal.add_option("-r", "--bitrate", type="eng_float", default=100e3, help="specify bitrate [default=%default].") normal.add_option("-v", "--verbose", action="store_true", default=False) - expert.add_option("-S", "--samples-per-symbol", type="int", default=2, + expert.add_option("-S", "--samples-per-symbol", type="int", default=None, help="set samples/symbol [default=%default]") expert.add_option("", "--log", action="store_true", default=False, help="Log all parts of flow graph to files (CAUTION: lots of data)") diff --git a/gnuradio-examples/python/digital/usrp_receive_path.py b/gnuradio-examples/python/digital/usrp_receive_path.py index c7b70fb2..de017651 100644 --- a/gnuradio-examples/python/digital/usrp_receive_path.py +++ b/gnuradio-examples/python/digital/usrp_receive_path.py @@ -76,13 +76,16 @@ class usrp_receive_path(gr.hier_block2): self.u = usrp_options.create_usrp_source(options) adc_rate = self.u.adc_rate() self.rs_rate = options.bitrate - 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()) + if options.verbose: + print 'USRP Source:', self.u + print 'Decimation: ', self._decim + options.samples_per_symbol = self._samples_per_symbol options.decim = self._decim