summaryrefslogtreecommitdiff
path: root/gr-digital/python/generic_mod_demod.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital/python/generic_mod_demod.py')
-rw-r--r--gr-digital/python/generic_mod_demod.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/gr-digital/python/generic_mod_demod.py b/gr-digital/python/generic_mod_demod.py
index 6f27092429..855249dc63 100644
--- a/gr-digital/python/generic_mod_demod.py
+++ b/gr-digital/python/generic_mod_demod.py
@@ -31,6 +31,11 @@ from utils import mod_codes
import digital_swig as digital
import math
+try:
+ from gnuradio import filter
+except ImportError:
+ import filter_swig as filter
+
# default values (used in __init__ and add_options)
_def_samples_per_symbol = 2
_def_excess_bw = 0.35
@@ -102,7 +107,7 @@ class generic_mod(gr.hier_block2):
gr.io_signature(1, 1, gr.sizeof_char), # Input signature
gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
- self._constellation = constellation.base()
+ self._constellation = constellation
self._samples_per_symbol = samples_per_symbol
self._excess_bw = excess_bw
self._differential = differential
@@ -135,8 +140,8 @@ class generic_mod(gr.hier_block2):
1.0, # symbol rate
self._excess_bw, # excess bandwidth (roll-off factor)
ntaps)
- self.rrc_filter = gr.pfb_arb_resampler_ccf(self._samples_per_symbol,
- self.rrc_taps)
+ self.rrc_filter = filter.pfb_arb_resampler_ccf(self._samples_per_symbol,
+ self.rrc_taps)
# Connect
blocks = [self, self.bytes2chunks]
@@ -238,7 +243,7 @@ class generic_demod(gr.hier_block2):
gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
gr.io_signature(1, 1, gr.sizeof_char)) # Output signature
- self._constellation = constellation.base()
+ self._constellation = constellation
self._samples_per_symbol = samples_per_symbol
self._excess_bw = excess_bw
self._phase_bw = phase_bw
@@ -276,7 +281,7 @@ class generic_demod(gr.hier_block2):
fmin = -0.25
fmax = 0.25
self.receiver = digital.constellation_receiver_cb(
- self._constellation, self._phase_bw,
+ self._constellation.base(), self._phase_bw,
fmin, fmax)
# Do differential decoding based on phase change of symbols