summaryrefslogtreecommitdiff
path: root/gr-usrp/src
diff options
context:
space:
mode:
authorjcorgan2007-07-19 04:39:37 +0000
committerjcorgan2007-07-19 04:39:37 +0000
commit27669cfcdca0d56642cf5279d372fe149e7b1d26 (patch)
treec40ffe7fc626687567004a7b779b82a0d1ac926a /gr-usrp/src
parent0c30f34bf0afa14e8f2ee128dd4168c7c372b862 (diff)
downloadgnuradio-27669cfcdca0d56642cf5279d372fe149e7b1d26.tar.gz
gnuradio-27669cfcdca0d56642cf5279d372fe149e7b1d26.tar.bz2
gnuradio-27669cfcdca0d56642cf5279d372fe149e7b1d26.zip
Merged r6015:6026 from jcorgan/radar.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6027 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-usrp/src')
-rw-r--r--gr-usrp/src/db_flexrf.py37
1 files changed, 34 insertions, 3 deletions
diff --git a/gr-usrp/src/db_flexrf.py b/gr-usrp/src/db_flexrf.py
index 271b14728..045bc39bd 100644
--- a/gr-usrp/src/db_flexrf.py
+++ b/gr-usrp/src/db_flexrf.py
@@ -225,7 +225,7 @@ class flexrf_base_tx(flexrf_base):
# power up the transmit side, but don't enable the mixer
self._u._write_oe(self._which,(POWER_UP|RX_TXN|ENABLE), 0xffff)
self._u.write_io(self._which, (self.power_on|RX_TXN), (POWER_UP|RX_TXN|ENABLE))
- self.lo_offset = 4e6 # FIXME may want to be a function of d'board
+ self.lo_offset = 4e6
def __del__(self):
#print "flexrf_base_tx.__del__"
@@ -275,7 +275,22 @@ class flexrf_base_tx(flexrf_base):
"""
return self._set_pga(self._u.pga_max())
-
+ def set_lo_offset(self, offset):
+ """
+ Set amount by which LO is offset from requested tuning frequency.
+
+ @param offset: offset in Hz
+ """
+ self.lo_offset = offset
+
+ def get_lo_offset(self):
+ """
+ Get amount by which LO is offset from requested tuning frequency.
+
+ @returns Offset in Hz
+ """
+ return self.lo_offset
+
class flexrf_base_rx(flexrf_base):
def __init__(self, usrp, which):
"""
@@ -293,7 +308,7 @@ class flexrf_base_rx(flexrf_base):
self.bypass_adc_buffers(True)
- self.lo_offset = -4e6 # FIXME may want to be a function of d'board
+ self.lo_offset = -4e6
def __del__(self):
# print "flexrf_base_rx.__del__"
@@ -346,6 +361,22 @@ class flexrf_base_rx(flexrf_base):
return self._u.write_aux_dac(self._which, 0, int(dac_value)) and \
self._set_pga(int(pga_gain))
+ def set_lo_offset(self, offset):
+ """
+ Set amount by which LO is offset from requested tuning frequency.
+
+ @param offset: offset in Hz
+ """
+ self.lo_offset = offset
+
+ def get_lo_offset(self):
+ """
+ Get amount by which LO is offset from requested tuning frequency.
+
+ @returns Offset in Hz
+ """
+ return self.lo_offset
+
# ----------------------------------------------------------------