summaryrefslogtreecommitdiff
path: root/gr-digital/python/qpsk.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital/python/qpsk.py')
-rw-r--r--gr-digital/python/qpsk.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/gr-digital/python/qpsk.py b/gr-digital/python/qpsk.py
index 91e8b196f..76e5df270 100644
--- a/gr-digital/python/qpsk.py
+++ b/gr-digital/python/qpsk.py
@@ -23,7 +23,6 @@
QPSK modulation.
Demodulation is not included since the generic_mod_demod
-doesn't work for non-differential encodings.
"""
from gnuradio import gr
@@ -33,8 +32,7 @@ import modulation_utils2
# Default number of points in constellation.
_def_constellation_points = 4
-# Whether differential coding is used.
-_def_differential = False
+# Whether gray coding is used.
_def_gray_coded = True
# /////////////////////////////////////////////////////////////////////////////
@@ -53,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):
@@ -70,9 +67,11 @@ class qpsk_mod(generic_mod):
constellation = digital_swig.constellation_qpsk()
if constellation_points != 4:
raise ValueError("QPSK can only have 4 constellation points.")
- if differential or not gray_coded:
- raise ValueError("This QPSK mod/demod works only for gray-coded, non-differential.")
- super(qpsk_mod, self).__init__(constellation, differential, gray_coded, *args, **kwargs)
+ if not gray_coded:
+ raise ValueError("This QPSK mod/demod works only for gray-coded constellations.")
+ super(qpsk_mod, self).__init__(constellation=constellation,
+ gray_coded=gray_coded,
+ *args, **kwargs)
# /////////////////////////////////////////////////////////////////////////////
@@ -98,8 +97,8 @@ class qpsk_demod(generic_demod):
constellation = digital_swig.constellation_qpsk()
if constellation_points != 4:
raise ValueError('Number of constellation points must be 4 for QPSK.')
- super(qpsk_demod, self).__init__(constellation, *args, **kwargs)
-
+ super(qpsk_demod, self).__init__(constellation=constellation,
+ *args, **kwargs)
#
# Add these to the mod/demod registry