diff options
author | Josh Blum | 2009-09-02 12:07:14 -0700 |
---|---|---|
committer | Josh Blum | 2009-09-02 12:07:14 -0700 |
commit | 3d27662913c78f672e3f7d7d1ebc2013ee038387 (patch) | |
tree | f3c11865f54cf770fb4d10228a98357d78c6ac57 /grc/grc_gnuradio/usrp/dual_usrp.py | |
parent | 12b02687d8504adc6efb747a51d3c2fa77a21d63 (diff) | |
download | gnuradio-3d27662913c78f672e3f7d7d1ebc2013ee038387.tar.gz gnuradio-3d27662913c78f672e3f7d7d1ebc2013ee038387.tar.bz2 gnuradio-3d27662913c78f672e3f7d7d1ebc2013ee038387.zip |
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/dual_usrp.py')
-rw-r--r-- | grc/grc_gnuradio/usrp/dual_usrp.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/grc/grc_gnuradio/usrp/dual_usrp.py b/grc/grc_gnuradio/usrp/dual_usrp.py index 1ecf7c47f..3692e1760 100644 --- a/grc/grc_gnuradio/usrp/dual_usrp.py +++ b/grc/grc_gnuradio/usrp/dual_usrp.py @@ -53,22 +53,22 @@ class _dual_source(gr.hier_block2): for i in range(2): self.connect((deinter, i), (self, i)) def set_decim_rate(self, decim): self._get_u().set_decim_rate(int(decim)) - def set_frequency_a(self, frequency, verbose=False): + def set_frequency_a(self, frequency, verbose=False, lo_offset=None): + if lo_offset is not None: self._subdev_a.set_lo_offset(lo_offset) self._set_frequency( chan=0, #ddc0 subdev=self._subdev_a, frequency=frequency, verbose=verbose, ) - def set_frequency_b(self, frequency, verbose=False): + def set_frequency_b(self, frequency, verbose=False, lo_offset=None): + if lo_offset is not None: self._subdev_b.set_lo_offset(lo_offset) self._set_frequency( chan=1, #ddc1 subdev=self._subdev_b, frequency=frequency, verbose=verbose, ) - def set_lo_offset_a(self, lo_offset): self._subdev_a.set_lo_offset(lo_offset) - def set_lo_offset_b(self, lo_offset): self._subdev_b.set_lo_offset(lo_offset) def set_gain_a(self, gain): self._subdev_a.set_gain(gain) def set_gain_b(self, gain): self._subdev_b.set_gain(gain) @@ -105,22 +105,22 @@ class _dual_sink(gr.hier_block2): for i in range(2): self.connect((self, i), (inter, i)) def set_interp_rate(self, interp): self._get_u().set_interp_rate(int(interp)) - def set_frequency_a(self, frequency, verbose=False): + def set_frequency_a(self, frequency, verbose=False, lo_offset=None): + if lo_offset is not None: self._subdev_a.set_lo_offset(lo_offset) self._set_frequency( chan=self._subdev_a.which(), subdev=self._subdev_a, frequency=frequency, verbose=verbose, ) - def set_frequency_b(self, frequency, verbose=False): + def set_frequency_b(self, frequency, verbose=False, lo_offset=None): + if lo_offset is not None: self._subdev_b.set_lo_offset(lo_offset) self._set_frequency( chan=self._subdev_b.which(), subdev=self._subdev_b, frequency=frequency, verbose=verbose, ) - def set_lo_offset_a(self, lo_offset): self._subdev_a.set_lo_offset(lo_offset) - def set_lo_offset_b(self, lo_offset): self._subdev_b.set_lo_offset(lo_offset) def set_gain_a(self, gain): self._subdev_a.set_gain(gain) def set_gain_b(self, gain): self._subdev_b.set_gain(gain) def set_enable_a(self, enable): self._subdev_a.set_enable(enable) |