summaryrefslogtreecommitdiff
path: root/grc/grc_gnuradio/usrp/simple_usrp.py
diff options
context:
space:
mode:
authorJohnathan Corgan2009-09-02 14:34:18 -0700
committerJohnathan Corgan2009-09-02 14:34:18 -0700
commita36c92ed48fb80c78a97a200b92b98d36a7d4c05 (patch)
treede1d9bddd0e6b1c356caff974da29d3147a717c1 /grc/grc_gnuradio/usrp/simple_usrp.py
parent6fb2acc3c49e3bb7b8845d517c4bff4a8f5b0fa8 (diff)
parent5c93024bc2d5235579bd3e815d56483935e9c48e (diff)
downloadgnuradio-a36c92ed48fb80c78a97a200b92b98d36a7d4c05.tar.gz
gnuradio-a36c92ed48fb80c78a97a200b92b98d36a7d4c05.tar.bz2
gnuradio-a36c92ed48fb80c78a97a200b92b98d36a7d4c05.zip
Merge branch 'lo_fix' from http://gnuradio.org/git/jblum.git into master
* Modifications to usrp2 source and sink so that set center freq is called afer set lo offset. * Modifications to the usrp blocks and wrapper so that the lo offset is set with the lo frequency.
Diffstat (limited to 'grc/grc_gnuradio/usrp/simple_usrp.py')
-rw-r--r--grc/grc_gnuradio/usrp/simple_usrp.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/grc/grc_gnuradio/usrp/simple_usrp.py b/grc/grc_gnuradio/usrp/simple_usrp.py
index 9065c7fe9..fc4c75bf0 100644
--- a/grc/grc_gnuradio/usrp/simple_usrp.py
+++ b/grc/grc_gnuradio/usrp/simple_usrp.py
@@ -56,8 +56,8 @@ class _simple_source(gr.hier_block2):
self._get_u().set_decim_rate(int(decim))
if self._no_hb: #set the BW to half the sample rate
self._subdev.set_bw(self._get_u().converter_rate()/decim/2)
- def set_lo_offset(self, lo_offset): self._subdev.set_lo_offset(lo_offset)
- def set_frequency(self, frequency, verbose=False):
+ def set_frequency(self, frequency, verbose=False, lo_offset=None):
+ if lo_offset is not None: self._subdev.set_lo_offset(lo_offset)
self._set_frequency(
chan=0, #ddc0
subdev=self._subdev,
@@ -96,14 +96,14 @@ class _simple_sink(gr.hier_block2):
self.connect(self, self._get_u())
def set_interp_rate(self, interp): self._get_u().set_interp_rate(int(interp))
- def set_frequency(self, frequency, verbose=False):
+ def set_frequency(self, frequency, verbose=False, lo_offset=None):
+ if lo_offset is not None: self._subdev.set_lo_offset(lo_offset)
self._set_frequency(
chan=self._subdev.which(),
subdev=self._subdev,
frequency=frequency,
verbose=verbose,
)
- def set_lo_offset(self, lo_offset): self._subdev.set_lo_offset(lo_offset)
def set_gain(self, gain): self._subdev.set_gain(gain)
def set_enable(self, enable): self._subdev.set_enable(enable)
def set_auto_tr(self, auto_tr): self._subdev.set_auto_tr(auto_tr)