summaryrefslogtreecommitdiff
path: root/gr-digital/python/digital/packet_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital/python/digital/packet_utils.py')
-rw-r--r--gr-digital/python/digital/packet_utils.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/gr-digital/python/digital/packet_utils.py b/gr-digital/python/digital/packet_utils.py
index efb3252b14..a73480bdcb 100644
--- a/gr-digital/python/digital/packet_utils.py
+++ b/gr-digital/python/digital/packet_utils.py
@@ -182,12 +182,16 @@ def _npadding_bytes(pkt_byte_len, samples_per_symbol, bits_per_symbol):
return byte_modulus - r
-def unmake_packet(whitened_payload_with_crc, whitener_offset=0, dewhitening=True):
+def unmake_packet(whitened_payload_with_crc, whitener_offset=0,
+ dewhitening=True, check_crc=True):
"""
Return (ok, payload)
Args:
whitened_payload_with_crc: string
+ whitener_offset: integer offset into whitener table
+ dewhitening: True if we should run this through the dewhitener
+ check_crc: True if we should check the CRC of the packet
"""
if dewhitening:
@@ -195,7 +199,11 @@ def unmake_packet(whitened_payload_with_crc, whitener_offset=0, dewhitening=True
else:
payload_with_crc = (whitened_payload_with_crc)
- ok, payload = crc.check_crc32(payload_with_crc)
+ if check_crc:
+ ok, payload = crc.check_crc32(payload_with_crc)
+ else:
+ payload = payload_with_crc
+ ok = True
if 0:
print "payload_with_crc =", string_to_hex_list(payload_with_crc)