diff options
author | Naoki Pross <np@0hm.ch> | 2021-10-22 11:18:03 +0200 |
---|---|---|
committer | Naoki Pross <np@0hm.ch> | 2021-10-22 11:40:10 +0200 |
commit | f550c9a343b1c0eb82cebba5aaa497387f184dc4 (patch) | |
tree | 8b4c6b1a9f773c40175d1dd16a5ab1ffa02e738b /src | |
parent | Create (empty) out of tree gnuradio module fading_ui with block rx_ui_sink (diff) | |
download | Fading-f550c9a343b1c0eb82cebba5aaa497387f184dc4.tar.gz Fading-f550c9a343b1c0eb82cebba5aaa497387f184dc4.zip |
Make gr block compilable
Diffstat (limited to '')
-rwxr-xr-x | src/gr-fading_ui/python/qa_rx_ui_sink.py | 7 | ||||
-rw-r--r-- | src/gr-fading_ui/python/rx_ui_sink.py | 4 | ||||
-rw-r--r-- | src/shell.nix | 4 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/gr-fading_ui/python/qa_rx_ui_sink.py b/src/gr-fading_ui/python/qa_rx_ui_sink.py index 6601b52..2cbf90a 100755 --- a/src/gr-fading_ui/python/qa_rx_ui_sink.py +++ b/src/gr-fading_ui/python/qa_rx_ui_sink.py @@ -32,9 +32,12 @@ class qa_rx_ui_sink(gr_unittest.TestCase): self.tb = None def test_001_t(self): - # set up fg + src_data = (-3, 4, -5.5, 2, 3) + src = blocks.vector_source_c(src_data, False) + sink = rx_ui_sink() + + self.tb.connect(src, sink) self.tb.run() - # check data if __name__ == '__main__': diff --git a/src/gr-fading_ui/python/rx_ui_sink.py b/src/gr-fading_ui/python/rx_ui_sink.py index cafe1ba..6dcb93e 100644 --- a/src/gr-fading_ui/python/rx_ui_sink.py +++ b/src/gr-fading_ui/python/rx_ui_sink.py @@ -30,12 +30,10 @@ class rx_ui_sink(gr.sync_block): def __init__(self): gr.sync_block.__init__(self, name="rx_ui_sink", - in_sig=[<+numpy.float32+>, ], + in_sig=[numpy.complex64], out_sig=None) def work(self, input_items, output_items): - in0 = input_items[0] - # <+signal processing here+> return len(input_items[0]) diff --git a/src/shell.nix b/src/shell.nix index ae4375e..edb49a5 100644 --- a/src/shell.nix +++ b/src/shell.nix @@ -12,7 +12,9 @@ in mkShell { gnuradio python38Packages.setuptools # gnuradio block dev dependencies - cmake pkg-config log4cpp mpir boost175 gmp volk + cmake ninja pkg-config log4cpp mpir boost175 gmp volk python38Packages.pybind11 + ]) ++ (with pkgs.python38Packages; [ + numpy ]); } |