[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r3652 - gnuradio/branches/developers/eb/digital-wip/gn
From: |
eb |
Subject: |
[Commit-gnuradio] r3652 - gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2 |
Date: |
Tue, 26 Sep 2006 19:43:07 -0600 (MDT) |
Author: eb
Date: 2006-09-26 19:43:07 -0600 (Tue, 26 Sep 2006)
New Revision: 3652
Modified:
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/receive_path.py
Log:
Re-enabled setting of --rx-gain. Added --show-rx-gain-range.
Modified:
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/receive_path.py
===================================================================
---
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/receive_path.py
2006-09-27 01:24:29 UTC (rev 3651)
+++
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/receive_path.py
2006-09-27 01:43:07 UTC (rev 3652)
@@ -93,8 +93,12 @@
raise ValueError, eng_notation.num_to_str(self._rx_freq)
g = self.subdev.gain_range()
- self.set_gain((g[0] + g[1])/2) # set gain to midpoint
- #self.set_gain(g[1]) # set gain to max
+ if options.show_rx_gain_range:
+ print "Rx Gain Range: minimum = %g, maximum = %g, step size = %g" \
+ % (g[0], g[1], g[2])
+
+ self.set_gain(options.rx_gain)
+
self.set_auto_tr(True) # enable Auto Transmit/Receive
switching
# Carrier Sensing Blocks
@@ -202,10 +206,11 @@
help="specify bitrate. samples-per-symbol and
interp/decim will be derived.")
normal.add_option("-R", "--rx-subdev-spec", type="subdev",
default=None,
help="select USRP Rx side A or B")
- normal.add_option("", "--rx-gain", type="eng_float", default=50.0,
metavar="GAIN",
- help="normalized receiver gain: 0 <= GAIN <= 100
[default=%default]")
+ normal.add_option("", "--rx-gain", type="eng_float", default=None,
metavar="GAIN",
+ help="set receiver gain in dB [default=midpoint].
See also --show-rx-gain-range")
+ normal.add_option("", "--show-rx-gain-range", action="store_true",
default=False,
+ help="print min and max Rx gain available on
selected daughterboard")
normal.add_option("-v", "--verbose", action="store_true",
default=False)
-
expert.add_option("-S", "--samples-per-symbol", type="int",
default=None,
help="set samples/symbol [default=%default]")
expert.add_option("", "--rx-freq", type="eng_float", default=None,
@@ -224,6 +229,7 @@
Prints information about the receive path
"""
print "Using RX d'board %s" % (self.subdev.side_and_name(),)
+ print "Rx gain: %g" % (self.gain,)
print "modulation: %s" % (self._demod_class.__name__)
print "bitrate: %sb/s" %
(eng_notation.num_to_str(self._bitrate))
print "samples/symbol: %3d" % (self._samples_per_symbol)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r3652 - gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2,
eb <=