summaryrefslogtreecommitdiff
path: root/gr-uhd
diff options
context:
space:
mode:
authorAndrej Rode <mail@andrejro.de>2018-06-23 19:01:34 +0200
committerAndrej Rode <mail@andrejro.de>2018-06-23 21:26:32 +0200
commitc40c0f3243711bbf25afdd0147d45f2e96b91c06 (patch)
tree7e739772ddc68f54d318a0fa2d1afde4afcdd429 /gr-uhd
parent5e07e65fe9350a51cd45f8f21cfa6bf144e42e1c (diff)
python: Py3k compat
Diffstat (limited to 'gr-uhd')
-rwxr-xr-xgr-uhd/apps/uhd_fft8
-rwxr-xr-xgr-uhd/apps/uhd_rx_cfile6
2 files changed, 7 insertions, 7 deletions
diff --git a/gr-uhd/apps/uhd_fft b/gr-uhd/apps/uhd_fft
index 4cb5eed0d1..777461fd63 100755
--- a/gr-uhd/apps/uhd_fft
+++ b/gr-uhd/apps/uhd_fft
@@ -218,7 +218,7 @@ class uhd_fft(gr.top_block, Qt.QWidget, UHDApp):
self.qtgui_waterfall_sink_x_0.enable_grid(False)
self.qtgui_waterfall_sink_x_0.disable_legend()
alpha = 10.**(len(self.channels)-1)
- for i in xrange(len(self.channels)):
+ for i in range(len(self.channels)):
self.qtgui_waterfall_sink_x_0.set_line_label(i, "Channel {0}".format(i))
self.qtgui_waterfall_sink_x_0.set_color_map(i, 0)
self.qtgui_waterfall_sink_x_0.set_line_alpha(i, alpha)
@@ -240,7 +240,7 @@ class uhd_fft(gr.top_block, Qt.QWidget, UHDApp):
self.qtgui_time_sink_x_0.enable_grid(False)
self.qtgui_time_sink_x_0.enable_control_panel(True)
self.qtgui_time_sink_x_0.disable_legend()
- for i in xrange(2*len(self.channels)):
+ for i in range(2*len(self.channels)):
if(i % 2 == 0):
self.qtgui_time_sink_x_0.set_line_label(i, "Re{{Channel {0}}}".format(i/2))
else:
@@ -268,7 +268,7 @@ class uhd_fft(gr.top_block, Qt.QWidget, UHDApp):
self.qtgui_freq_sink_x_0.set_fft_average(self.fft_average)
self.qtgui_freq_sink_x_0.enable_control_panel(True)
self.qtgui_freq_sink_x_0.disable_legend()
- for i in xrange(len(self.channels)):
+ for i in range(len(self.channels)):
self.qtgui_freq_sink_x_0.set_line_label(i, "Channel {0}".format(i))
self.qtgui_freq_sink_x_0.set_line_width(i, widths[i])
self.qtgui_freq_sink_x_0.set_line_color(i, colors[i])
@@ -305,7 +305,7 @@ class uhd_fft(gr.top_block, Qt.QWidget, UHDApp):
self.qtgui_phase_plot.enable_grid(True)
self.qtgui_phase_plot.enable_control_panel(True)
self.qtgui_phase_plot.disable_legend()
- for i in xrange(len(self.channels) - 1):
+ for i in range(len(self.channels) - 1):
self.qtgui_phase_plot.set_line_label(i, "Phase Delta Channels {0}/{1}".format(i, i+1))
self.qtgui_phase_plot.set_line_width(i, widths[i])
self.qtgui_phase_plot.set_line_color(i, colors[i])
diff --git a/gr-uhd/apps/uhd_rx_cfile b/gr-uhd/apps/uhd_rx_cfile
index 2a1ed0fcb5..d41027ff39 100755
--- a/gr-uhd/apps/uhd_rx_cfile
+++ b/gr-uhd/apps/uhd_rx_cfile
@@ -79,7 +79,7 @@ class rx_cfile_block(gr.top_block):
)
# Set the subdevice spec:
if options.spec:
- for mb_idx in xrange(self._u.get_num_mboards()):
+ for mb_idx in range(self._u.get_num_mboards()):
self._u.set_subdev_spec(options.spec, mb_idx)
# Set the antenna:
if options.antenna is not None:
@@ -125,7 +125,7 @@ class rx_cfile_block(gr.top_block):
self._u.set_time_unknown_pps(uhd.time_spec())
cmd_time = self._u.get_time_now() + uhd.time_spec(COMMAND_DELAY)
try:
- for mb_idx in xrange(self._u.get_num_mboards()):
+ for mb_idx in range(self._u.get_num_mboards()):
self._u.set_command_time(cmd_time, mb_idx)
command_time_set = True
except RuntimeError:
@@ -136,7 +136,7 @@ class rx_cfile_block(gr.top_block):
sys.stderr.write('[UHD_RX] [ERROR] Failed to set center frequency on channel {chan}\n'.format(chan=chan))
exit(1)
if command_time_set:
- for mb_idx in xrange(self._u.get_num_mboards()):
+ for mb_idx in range(self._u.get_num_mboards()):
self._u.clear_command_time(mb_idx)
print("[UHD_RX] Syncing channels...")
time.sleep(COMMAND_DELAY)