summaryrefslogtreecommitdiff
path: root/gr-digital
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital')
-rwxr-xr-xgr-digital/examples/benchmark_rx.py5
-rw-r--r--gr-digital/examples/receive_path.py10
-rw-r--r--gr-digital/python/generic_mod_demod.py20
-rw-r--r--gr-digital/python/qpsk.py1
4 files changed, 18 insertions, 18 deletions
diff --git a/gr-digital/examples/benchmark_rx.py b/gr-digital/examples/benchmark_rx.py
index 9d8734e3d..9390540dd 100755
--- a/gr-digital/examples/benchmark_rx.py
+++ b/gr-digital/examples/benchmark_rx.py
@@ -48,11 +48,14 @@ class my_top_block(gr.top_block):
self.rxpath = receive_path(demodulator, rx_callback, options)
if(options.from_file is not None):
+ self.thr = gr.throttle(gr.sizeof_gr_complex, 1e6)
self.source = gr.file_source(gr.sizeof_gr_complex, options.from_file)
+ self.connect(self.source, self.thr, self.rxpath)
else:
+ self.thr = gr.throttle(gr.sizeof_gr_complex, 1e6)
self.source = gr.null_source(gr.sizeof_gr_complex)
+ self.connect(self.source, self.thr, self.rxpath)
- self.connect(self.source, self.rxpath)
# /////////////////////////////////////////////////////////////////////////////
# main
diff --git a/gr-digital/examples/receive_path.py b/gr-digital/examples/receive_path.py
index 9bc5f7b8f..c6a26daf2 100644
--- a/gr-digital/examples/receive_path.py
+++ b/gr-digital/examples/receive_path.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2005,2006,2007 Free Software Foundation, Inc.
+# Copyright 2005-2007,2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -42,7 +42,6 @@ class receive_path(gr.hier_block2):
self._verbose = options.verbose
self._bitrate = options.bitrate # desired bit rate
- self._samples_per_symbol = options.samples_per_symbol # desired samples/symbol
self._rx_callback = rx_callback # this callback is fired when there's a packet available
self._demod_class = demod_class # the demodulator_class we're using
@@ -50,10 +49,13 @@ class receive_path(gr.hier_block2):
# Get demod_kwargs
demod_kwargs = self._demod_class.extract_kwargs_from_options(options)
+ # Build the demodulator
+ demodulator = self._demod_class(**demod_kwargs)
+
# Design filter to get actual channel we want
sw_decim = 1
chan_coeffs = gr.firdes.low_pass (1.0, # gain
- sw_decim * self._samples_per_symbol, # sampling rate
+ sw_decim * demodulator._samples_per_symbol, # sampling rate
1.0, # midpoint of trans. band
0.5, # width of trans. band
gr.firdes.WIN_HANN) # filter type
@@ -61,7 +63,7 @@ class receive_path(gr.hier_block2):
# receiver
self.packet_receiver = \
- digital.demod_pkts(self._demod_class(**demod_kwargs),
+ digital.demod_pkts(demodulator,
access_code=None,
callback=self._rx_callback,
threshold=-1)
diff --git a/gr-digital/python/generic_mod_demod.py b/gr-digital/python/generic_mod_demod.py
index b5c727058..fad01fdfc 100644
--- a/gr-digital/python/generic_mod_demod.py
+++ b/gr-digital/python/generic_mod_demod.py
@@ -248,7 +248,7 @@ class generic_demod(gr.hier_block2):
self._phase_bw = phase_bw
self._freq_bw = freq_bw
self._timing_bw = timing_bw
- self._timing_max_dev= _def_timing_max_dev,
+ self._timing_max_dev= _def_timing_max_dev
self._differential = differential
if self._samples_per_symbol < 2:
@@ -271,7 +271,7 @@ class generic_demod(gr.hier_block2):
1.0, self._excess_bw, ntaps)
self.time_recov = gr.pfb_clock_sync_ccf(self._samples_per_symbol,
self._timing_bw, taps,
- nfilts, nfilts/2, self._timing_max_dev)
+ nfilts, nfilts//2, self._timing_max_dev)
self._phase_alpha = 0.1
self._phase_beta = 0.25 * self._phase_alpha * self._phase_alpha
@@ -367,16 +367,12 @@ class generic_demod(gr.hier_block2):
# Add options shared with modulator.
add_common_options(parser)
# Add options specific to demodulator.
- parser.add_option("", "--freq-alpha", type="float", default=_def_freq_alpha,
- help="set frequency lock loop alpha gain value [default=%default]")
- parser.add_option("", "--phase-alpha", type="float", default=_def_phase_alpha,
- help="set phase tracking loop alpha value [default=%default]")
- parser.add_option("", "--timing-alpha", type="float", default=_def_timing_alpha,
- help="set timing symbol sync loop gain alpha value [default=%default]")
- parser.add_option("", "--timing-beta", type="float", default=_def_timing_beta,
- help="set timing symbol sync loop gain beta value [default=%default]")
- parser.add_option("", "--timing-max-dev", type="float", default=_def_timing_max_dev,
- help="set timing symbol sync loop maximum deviation [default=%default]")
+ parser.add_option("", "--freq-bw", type="float", default=_def_freq_bw,
+ help="set frequency lock loop lock-in bandwidth [default=%default]")
+ parser.add_option("", "--phase-bw", type="float", default=_def_phase_bw,
+ help="set phase tracking loop lock-in bandwidth [default=%default]")
+ parser.add_option("", "--timing-bw", type="float", default=_def_timing_bw,
+ help="set timing symbol sync loop gain lock-in bandwidth [default=%default]")
add_options=staticmethod(add_options)
def extract_kwargs_from_options(cls, options):
diff --git a/gr-digital/python/qpsk.py b/gr-digital/python/qpsk.py
index 031aa03a5..76e5df270 100644
--- a/gr-digital/python/qpsk.py
+++ b/gr-digital/python/qpsk.py
@@ -51,7 +51,6 @@ def qpsk_constellation(m=_def_constellation_points):
class qpsk_mod(generic_mod):
def __init__(self, constellation_points=_def_constellation_points,
- differential=_def_differential,
gray_coded=_def_gray_coded,
*args, **kwargs):