summaryrefslogtreecommitdiff
path: root/gr-blocks/python/blocks/qa_block_gateway.py
diff options
context:
space:
mode:
authorMarcus Müller <marcus@hostalia.de>2018-08-31 23:02:22 +0200
committerMarcus Müller <marcus@hostalia.de>2018-08-31 23:02:22 +0200
commit254fe5e89403d4de1fa6663d09efdf946996aff3 (patch)
tree62877d7ac7fdedf6c397c51e22ac6f97eba97ddf /gr-blocks/python/blocks/qa_block_gateway.py
parent896d1c9da31963ecf5b0d90942c2af51ca998a69 (diff)
parent5ad935c3a3dd46ce2860b13e2b774e4841784616 (diff)
Merge remote-tracking branch 'origin/next' into merge_next
Diffstat (limited to 'gr-blocks/python/blocks/qa_block_gateway.py')
-rw-r--r--gr-blocks/python/blocks/qa_block_gateway.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/gr-blocks/python/blocks/qa_block_gateway.py b/gr-blocks/python/blocks/qa_block_gateway.py
index 6fdb0090ae..23036eec57 100644
--- a/gr-blocks/python/blocks/qa_block_gateway.py
+++ b/gr-blocks/python/blocks/qa_block_gateway.py
@@ -1,3 +1,5 @@
+from __future__ import division
+
#
# Copyright 2011-2013 Free Software Foundation, Inc.
#
@@ -126,7 +128,7 @@ class tag_source(gr.sync_block):
#put code here to fill the output items...
#make a new tag on the middle element every time work is called
- count = self.nitems_written(0) + num_output_items/2
+ count = self.nitems_written(0) + num_output_items // 2
key = pmt.string_to_symbol("example_key")
value = pmt.string_to_symbol("example_value")
self.add_item_tag(0, count, key, value)
@@ -200,8 +202,8 @@ class vector_to_stream(gr.interp_block):
def work(self, input_items, output_items):
n = 0
- for i in xrange(len(input_items[0])):
- for j in xrange(self.block_size):
+ for i in range(len(input_items[0])):
+ for j in range(self.block_size):
output_items[0][n] = input_items[0][i][j]
n += 1