diff options
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gru/CMakeLists.txt | 1 | ||||
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gru/__init__.py | 1 | ||||
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gru/hexint.py | 32 | ||||
-rw-r--r-- | gr-digital/python/digital/crc.py | 2 |
4 files changed, 1 insertions, 35 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gru/CMakeLists.txt b/gnuradio-runtime/python/gnuradio/gru/CMakeLists.txt index d7d05ec86a..fa3baa5221 100644 --- a/gnuradio-runtime/python/gnuradio/gru/CMakeLists.txt +++ b/gnuradio-runtime/python/gnuradio/gru/CMakeLists.txt @@ -11,7 +11,6 @@ GR_PYTHON_INSTALL(FILES __init__.py freqz.py gnuplot_freqz.py - hexint.py msgq_runner.py daemon.py DESTINATION ${GR_PYTHON_DIR}/gnuradio/gru diff --git a/gnuradio-runtime/python/gnuradio/gru/__init__.py b/gnuradio-runtime/python/gnuradio/gru/__init__.py index 5f20c17aa1..c78c80960a 100644 --- a/gnuradio-runtime/python/gnuradio/gru/__init__.py +++ b/gnuradio-runtime/python/gnuradio/gru/__init__.py @@ -4,5 +4,4 @@ from .daemon import * from .freqz import * from .gnuplot_freqz import * -from .hexint import * from .msgq_runner import * diff --git a/gnuradio-runtime/python/gnuradio/gru/hexint.py b/gnuradio-runtime/python/gnuradio/gru/hexint.py deleted file mode 100644 index ad568b59a6..0000000000 --- a/gnuradio-runtime/python/gnuradio/gru/hexint.py +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright 2005 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# SPDX-License-Identifier: GPL-3.0-or-later -# -# - -def hexint(mask): - """ - Convert unsigned masks into signed ints. - - This allows us to use hex constants like 0xf0f0f0f2 when talking to - our hardware and not get screwed by them getting treated as python - longs. - """ - if mask >= 2**31: - return int(mask-2**32) - return mask - -def hexshort(mask): - """ - Convert unsigned masks into signed shorts. - - This allows us to use hex constants like 0x8000 when talking to - our hardware and not get screwed by them getting treated as python - longs. - """ - if mask >= 2**15: - return int(mask-2**16) - return mask diff --git a/gr-digital/python/digital/crc.py b/gr-digital/python/digital/crc.py index 1c39bc1bbc..7407f70405 100644 --- a/gr-digital/python/digital/crc.py +++ b/gr-digital/python/digital/crc.py @@ -13,7 +13,7 @@ import struct def gen_and_append_crc32(s): crc = digital.crc32(s) - return s + struct.pack(">I", gru.hexint(crc) & 0xFFFFFFFF) + return s + struct.pack(">I", crc) def check_crc32(s): if len(s) < 4: |