aboutsummaryrefslogtreecommitdiffstats
path: root/src/gr-fadingui/python
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2021-11-24 20:20:40 +0100
committerNao Pross <np@0hm.ch>2021-11-24 20:20:40 +0100
commitc9e98bbf349dd74dfe3d6ef1a71f91418dfc2eb4 (patch)
tree34c6e832aa949265061ae7cb80a097cf2666695c /src/gr-fadingui/python
parentFir ganzalig implementiert, interpoliert versuch (diff)
downloadFading-c9e98bbf349dd74dfe3d6ef1a71f91418dfc2eb4.tar.gz
Fading-c9e98bbf349dd74dfe3d6ef1a71f91418dfc2eb4.zip
Discussion
Diffstat (limited to 'src/gr-fadingui/python')
-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