aboutsummaryrefslogtreecommitdiffstats
path: root/src/gr-fadingui/python
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/gr-fadingui/python/qa_xor_frame_sync.py2
-rw-r--r--src/gr-fadingui/python/xor_frame_sync.py8
2 files changed, 7 insertions, 3 deletions
diff --git a/src/gr-fadingui/python/qa_xor_frame_sync.py b/src/gr-fadingui/python/qa_xor_frame_sync.py
index e763d00..9c480a0 100644
--- a/src/gr-fadingui/python/qa_xor_frame_sync.py
+++ b/src/gr-fadingui/python/qa_xor_frame_sync.py
@@ -19,7 +19,7 @@ class test_xor_frame_sync(gr_unittest.TestCase):
pattern = np.array([0xc0, 0xff, 0xee], dtype=np.uint8)
testdata = np.packbits(np.concatenate([
np.unpackbits(np.arange(0, 5, dtype=np.uint8)),
- # np.random.randint(0, 2, size = 8 * 5),
+ np.random.randint(0, 2, size = 8 * 5),
np.unpackbits(pattern),
np.random.randint(0, 2, size = 64)
]))
diff --git a/src/gr-fadingui/python/xor_frame_sync.py b/src/gr-fadingui/python/xor_frame_sync.py
index 312ad2a..bb5cfb1 100644
--- a/src/gr-fadingui/python/xor_frame_sync.py
+++ b/src/gr-fadingui/python/xor_frame_sync.py
@@ -133,16 +133,20 @@ class xor_frame_sync(gr.sync_block):
# return data with delay
out = output_items[0]
# FIXME: this is also wrong
- out[:] = self.delaybuf[:len(out)]
+ # out[:] = self.delaybuf[:len(out)]
+ out[:] = inp[:]
inptmp = np.array(inp[:12], dtype=np.uint8)
inphex = np.array(list(map(hex, inptmp)))
+ inpbits = np.array(list(map("{:08b}".format, inptmp)))
+
log.debug(f"inp={inptmp}")
log.debug(f"inp={inphex}")
+ log.debug(f"inp={inpbits}")
# outtmp = np.array(out[:12], dtype=np.uint8)
# log.debug(f"out={outtmp}")
- return len(out)
+ return inp_len