[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r3591 - gnuradio/branches/developers/eb/digital-wip/gn
From: |
eb |
Subject: |
[Commit-gnuradio] r3591 - gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2 |
Date: |
Tue, 19 Sep 2006 22:39:58 -0600 (MDT) |
Author: eb
Date: 2006-09-19 22:39:58 -0600 (Tue, 19 Sep 2006)
New Revision: 3591
Modified:
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/receive_path.py
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/transmit_path.py
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/tunnel.py
Log:
more cleanup
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-20 04:24:06 UTC (rev 3590)
+++
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/receive_path.py
2006-09-20 04:39:58 UTC (rev 3591)
@@ -51,6 +51,10 @@
self._rx_callback = rx_callback # this callback is fired when
there's a packet available
self._demod_class = demod_class # the demodulator_class we're
using
+ if self._rx_freq is None:
+ sys.stderr.write("-f FREQ or --freq FREQ or --rx-freq FREQ must be
specified\n")
+ raise SystemExit
+
# Set up USRP source; also adjusts decim, samples_per_symbol, and
bitrate
self._setup_usrp_source()
@@ -83,14 +87,10 @@
callback=self._rx_callback,
threshold=-1)
- if self._rx_freq is None:
- sys.stderr.write("-f FREQ or --freq FREQ or --rx-freq FREQ must be
specified\n")
- raise SystemExit
-
ok = self.set_freq(self._rx_freq)
if not ok:
print "Failed to set Rx frequency to %s" %
(eng_notation.num_to_str(self._rx_freq))
- raise ValueError
+ 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
Modified:
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/transmit_path.py
===================================================================
---
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/transmit_path.py
2006-09-20 04:24:06 UTC (rev 3590)
+++
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/transmit_path.py
2006-09-20 04:39:58 UTC (rev 3591)
@@ -53,6 +53,10 @@
self._modulator_class = modulator_class # the modulator_class
we are using
+ if self._tx_freq is None:
+ sys.stderr.write("-f FREQ or --freq FREQ or --tx-freq FREQ must be
specified\n")
+ raise SystemExit
+
# Set up USRP sink; also adjusts interp, samples_per_symbol, and
bitrate
self._setup_usrp_sink()
@@ -64,15 +68,11 @@
# Get mod_kwargs
mod_kwargs = self._modulator_class.extract_kwargs_from_options(options)
- if self._tx_freq is None:
- sys.stderr.write("-f FREQ or --freq FREQ or --tx-freq FREQ must be
specified\n")
- raise SystemExit
-
# Set center frequency of USRP
ok = self.set_freq(self._tx_freq)
if not ok:
- print "Failed to set Tx frequency to %s" %
(eng_notation.num_to_str(options.freq),)
- raise ValueError
+ print "Failed to set Tx frequency to %s" %
(eng_notation.num_to_str(self._tx_freq),)
+ raise ValueError, eng_notation.num_to_str(self._tx_freq)
# transmitter
self.packet_transmitter = \
Modified:
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/tunnel.py
===================================================================
---
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/tunnel.py
2006-09-20 04:24:06 UTC (rev 3590)
+++
gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2/tunnel.py
2006-09-20 04:39:58 UTC (rev 3591)
@@ -259,8 +259,8 @@
print "freq: %s" %
(eng_notation.num_to_str(options.tx_freq))
print "bitrate: %sb/sec" %
(eng_notation.num_to_str(fg.txpath.bitrate()),)
print "samples/symbol: %3d" % (fg.txpath.samples_per_symbol(),)
- print "interp: %3d" % (fg.txpath.interp(),)
- print "decim: %3d" % (fg.rxpath.decim(),)
+ #print "interp: %3d" % (fg.txpath.interp(),)
+ #print "decim: %3d" % (fg.rxpath.decim(),)
fg.rxpath.set_carrier_threshold(options.carrier_threshold)
print "Carrier sense threshold:", options.carrier_threshold, "dB"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r3591 - gnuradio/branches/developers/eb/digital-wip/gnuradio-examples/python/gmsk2,
eb <=