summaryrefslogtreecommitdiff
path: root/gr-digital/python/qpsk.py
diff options
context:
space:
mode:
authorTom Rondeau2011-08-09 21:50:13 -0400
committerTom Rondeau2011-08-09 21:50:13 -0400
commit61db1684fdda602d18134b2e8c510bb7e33245fc (patch)
treed1bb6dc6c824c98d82b17027d271292dab66eb6e /gr-digital/python/qpsk.py
parent386a73c53aeb36bdf10e28fc5366385faebe78b2 (diff)
downloadgnuradio-61db1684fdda602d18134b2e8c510bb7e33245fc.tar.gz
gnuradio-61db1684fdda602d18134b2e8c510bb7e33245fc.tar.bz2
gnuradio-61db1684fdda602d18134b2e8c510bb7e33245fc.zip
digital: setting up receive path to use new timing loop API, FLL API, new gain names/settings. Also added concept of gray coding to generic mod/demod and reworked bpsk/qpsk modulators so both work.
Diffstat (limited to 'gr-digital/python/qpsk.py')
-rw-r--r--gr-digital/python/qpsk.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/gr-digital/python/qpsk.py b/gr-digital/python/qpsk.py
index 91e8b196f..031aa03a5 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
# /////////////////////////////////////////////////////////////////////////////
@@ -70,9 +68,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 +98,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