summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-digital/Makefile.am2
-rw-r--r--gr-digital/python/__init__.py3
-rw-r--r--gr-digital/python/crc.py7
-rw-r--r--gr-digital/python/dbpsk.py4
-rw-r--r--gr-digital/python/packet_utils.py4
-rw-r--r--gr-digital/python/pkt.py3
6 files changed, 14 insertions, 9 deletions
diff --git a/gr-digital/Makefile.am b/gr-digital/Makefile.am
index 62c40f2df..f1409793f 100644
--- a/gr-digital/Makefile.am
+++ b/gr-digital/Makefile.am
@@ -24,7 +24,7 @@ include $(top_srcdir)/Makefile.common
SUBDIRS = lib
if PYTHON
-SUBDIRS += swig python apps grc
+SUBDIRS += swig python apps grc examples
endif
pkgconfigdir = $(libdir)/pkgconfig
diff --git a/gr-digital/python/__init__.py b/gr-digital/python/__init__.py
index a17128e7d..73c69bb27 100644
--- a/gr-digital/python/__init__.py
+++ b/gr-digital/python/__init__.py
@@ -27,3 +27,6 @@ from dqpsk import *
from d8psk import *
from psk2 import *
from qam import *
+from pkt import *
+from packet_utils import *
+from crc import *
diff --git a/gr-digital/python/crc.py b/gr-digital/python/crc.py
index f9d369f4c..198ab059f 100644
--- a/gr-digital/python/crc.py
+++ b/gr-digital/python/crc.py
@@ -19,11 +19,12 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr, gru
+from gnuradio import gru
+import digital_swig
import struct
def gen_and_append_crc32(s):
- crc = gr.crc32(s)
+ crc = digital_swig.crc32(s)
return s + struct.pack(">I", gru.hexint(crc) & 0xFFFFFFFF)
def check_crc32(s):
@@ -31,7 +32,7 @@ def check_crc32(s):
return (False, '')
msg = s[:-4]
#print "msg = '%s'" % (msg,)
- actual = gr.crc32(msg)
+ actual = digital_swig.crc32(msg)
(expected,) = struct.unpack(">I", s[-4:])
# print "actual =", hex(actual), "expected =", hex(expected)
return (actual == expected, msg)
diff --git a/gr-digital/python/dbpsk.py b/gr-digital/python/dbpsk.py
index 21ca0474b..1732c44ea 100644
--- a/gr-digital/python/dbpsk.py
+++ b/gr-digital/python/dbpsk.py
@@ -366,5 +366,5 @@ class dbpsk_demod(gr.hier_block2):
#
# Add these to the mod/demod registry
#
-modulation_utils2.add_type_1_mod('dbpsk3', dbpsk_mod)
-modulation_utils2.add_type_1_demod('dbpsk3', dbpsk_demod)
+modulation_utils2.add_type_1_mod('dbpsk', dbpsk_mod)
+modulation_utils2.add_type_1_demod('dbpsk', dbpsk_demod)
diff --git a/gr-digital/python/packet_utils.py b/gr-digital/python/packet_utils.py
index e36b05413..addbf43f5 100644
--- a/gr-digital/python/packet_utils.py
+++ b/gr-digital/python/packet_utils.py
@@ -22,7 +22,7 @@
import struct
import numpy
from gnuradio import gru
-
+import crc
def conv_packed_binary_string_to_1_0_string(s):
"""
@@ -127,7 +127,7 @@ def make_packet(payload, samples_per_symbol, bits_per_symbol,
(packed_access_code, padded) = conv_1_0_string_to_packed_binary_string(access_code)
(packed_preamble, ignore) = conv_1_0_string_to_packed_binary_string(preamble)
- payload_with_crc = gru.gen_and_append_crc32(payload)
+ payload_with_crc = crc.gen_and_append_crc32(payload)
#print "outbound crc =", string_to_hex_list(payload_with_crc[-4:])
L = len(payload_with_crc)
diff --git a/gr-digital/python/pkt.py b/gr-digital/python/pkt.py
index aa720d1a5..80001a187 100644
--- a/gr-digital/python/pkt.py
+++ b/gr-digital/python/pkt.py
@@ -20,8 +20,9 @@
#
from math import pi
-from gnuradio import gr, packet_utils
+from gnuradio import gr
import gnuradio.gr.gr_threading as _threading
+import packet_utils
# /////////////////////////////////////////////////////////////////////////////