summaryrefslogtreecommitdiff
path: root/gr-digital/examples/ofdm/transmit_path.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital/examples/ofdm/transmit_path.py')
-rw-r--r--gr-digital/examples/ofdm/transmit_path.py29
1 files changed, 16 insertions, 13 deletions
diff --git a/gr-digital/examples/ofdm/transmit_path.py b/gr-digital/examples/ofdm/transmit_path.py
index 98a81f3c1a..17adffab44 100644
--- a/gr-digital/examples/ofdm/transmit_path.py
+++ b/gr-digital/examples/ofdm/transmit_path.py
@@ -1,23 +1,26 @@
#
# Copyright 2005,2006,2011 Free Software Foundation, Inc.
-#
+#
# This file is part of GNU Radio
-#
+#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
-#
+#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
+#
+
+from __future__ import print_function
+from __future__ import unicode_literals
from gnuradio import gr
from gnuradio import eng_notation
@@ -31,15 +34,15 @@ import sys
# transmit path
# /////////////////////////////////////////////////////////////////////////////
-class transmit_path(gr.hier_block2):
+class transmit_path(gr.hier_block2):
def __init__(self, options):
'''
See below for what options should hold
'''
- gr.hier_block2.__init__(self, "transmit_path",
- gr.io_signature(0, 0, 0),
- gr.io_signature(1, 1, gr.sizeof_gr_complex))
+ gr.hier_block2.__init__(self, "transmit_path",
+ gr.io_signature(0, 0, 0),
+ gr.io_signature(1, 1, gr.sizeof_gr_complex))
options = copy.copy(options) # make a copy so we can destructively modify
@@ -63,13 +66,13 @@ class transmit_path(gr.hier_block2):
def set_tx_amplitude(self, ampl):
"""
Sets the transmit amplitude sent to the USRP
-
+
Args:
: ampl 0 <= ampl < 1.0. Try 0.10
"""
self._tx_amplitude = max(0.0, min(ampl, 1))
self.amp.set_k(self._tx_amplitude)
-
+
def send_pkt(self, payload='', eof=False):
"""
Calls the transmitter method to send a packet
@@ -97,5 +100,5 @@ class transmit_path(gr.hier_block2):
"""
Prints information about the transmit path
"""
- print "Tx amplitude %s" % (self._tx_amplitude)
-
+ print("Tx amplitude %s" % (self._tx_amplitude))
+