[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 04/09: uhd: Fix bug #901: Default antenna v
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 04/09: uhd: Fix bug #901: Default antenna value causes app to fail |
Date: |
Sun, 21 Feb 2016 15:39:13 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit f10b8f75c777c5a5234856698fa73f51ed27f217
Author: Martin Braun <address@hidden>
Date: Fri Feb 19 22:01:34 2016 -0800
uhd: Fix bug #901: Default antenna value causes app to fail
---
gr-uhd/apps/uhd_rx_cfile | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/gr-uhd/apps/uhd_rx_cfile b/gr-uhd/apps/uhd_rx_cfile
index 85a7562..f76dc2e 100755
--- a/gr-uhd/apps/uhd_rx_cfile
+++ b/gr-uhd/apps/uhd_rx_cfile
@@ -82,20 +82,21 @@ class rx_cfile_block(gr.top_block):
for mb_idx in xrange(self._u.get_num_mboards()):
self._u.set_subdev_spec(options.spec, mb_idx)
# Set the antenna:
- self.antenna = [x.strip() for x in options.antenna.split(",")]
- if len(self.antenna) != 1 and len(self.antenna) != len(self.channels):
- sys.stderr.write("[UHD_RX] [ERROR] Invalid antenna setting for {}
channels: {}".format(
- len(self.channels), options.antenna
- ))
- exit(1)
- if len(self.antenna) == 1 and len(self.channels) > 1:
- self.antenna = [self.antenna[0],] * len(self.channels)
- for i, chan in enumerate(self.channels):
- self._u.set_antenna(self.antenna[i], chan)
- if options.verbose:
- print("[UHD_RX] Channel {chan}: Using antenna {ant}.".format(
- chan=chan, ant=self._u.get_antenna(chan)
+ if options.antenna is not None:
+ self.antenna = [x.strip() for x in options.antenna.split(",")]
+ if len(self.antenna) != 1 and len(self.antenna) !=
len(self.channels):
+ sys.stderr.write("[UHD_RX] [ERROR] Invalid antenna setting for
{} channels: {}".format(
+ len(self.channels), options.antenna
))
+ exit(1)
+ if len(self.antenna) == 1 and len(self.channels) > 1:
+ self.antenna = [self.antenna[0],] * len(self.channels)
+ for i, chan in enumerate(self.channels):
+ self._u.set_antenna(self.antenna[i], chan)
+ if options.verbose:
+ print("[UHD_RX] Channel {chan}: Using antenna
{ant}.".format(
+ chan=chan, ant=self._u.get_antenna(chan)
+ ))
# Set receiver sample rate:
self._u.set_samp_rate(options.samp_rate)
samp_rate = self._u.get_samp_rate()
- [Commit-gnuradio] [gnuradio] branch maint updated (e2c5119 -> 3a2cf6e), git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 07/09: Merge remote-tracking branch 'tom/qtgui_off_by_1' into maint, git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 08/09: Merge remote-tracking branch 'mbr0wn/uhd/fix_antenna_split' into maint, git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 06/09: Fix compilation in gcc-6, git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 04/09: uhd: Fix bug #901: Default antenna value causes app to fail,
git <=
- [Commit-gnuradio] [gnuradio] 03/09: qtgui: fixed a stray +1 that was duplicating tags., git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 09/09: Merge remote-tracking branch 'mbr0wn/blocks/tagged_stream_align_tags' into maint, git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 01/09: grc: remove position offset when pasting blocks into an empty flow graph, git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 02/09: grc: ignore unknown block keys when pasting blocks, git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 05/09: blocks: Fixed bug #903: tagged_stream_align duplicates tags, git, 2016/02/21