[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] gr-radio-astronomy/src/python usrp_ra_receiver.py
From: |
Marcus D. Leech |
Subject: |
[Commit-gnuradio] gr-radio-astronomy/src/python usrp_ra_receiver.py |
Date: |
Thu, 29 Jun 2006 15:39:15 +0000 |
CVSROOT: /sources/gnuradio
Module name: gr-radio-astronomy
Changes by: Marcus D. Leech <mleech> 06/06/29 15:39:14
Modified files:
src/python : usrp_ra_receiver.py
Log message:
Shuffled location of local_calibrator
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gr-radio-astronomy/src/python/usrp_ra_receiver.py?cvsroot=gnuradio&r1=1.1&r2=1.2
Patches:
Index: usrp_ra_receiver.py
===================================================================
RCS file: /sources/gnuradio/gr-radio-astronomy/src/python/usrp_ra_receiver.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- usrp_ra_receiver.py 23 May 2006 00:37:56 -0000 1.1
+++ usrp_ra_receiver.py 29 Jun 2006 15:39:14 -0000 1.2
@@ -22,16 +22,17 @@
from gnuradio import gr, gru
from gnuradio import usrp
+import usrp_dbid
from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import stdgui, ra_fftsink, waterfallsink,
ra_stripchartsink, form, slider
+from gnuradio.wxgui import stdgui, ra_fftsink, ra_stripchartsink,
waterfallsink, form, slider
from optparse import OptionParser
import wx
import sys
from Numeric import *
import FFT
import ephem
-from local_calibrator import *
+from gnuradio import local_calibrator
class app_flow_graph(stdgui.gui_flow_graph):
@@ -82,6 +83,8 @@
self.u = usrp.source_c(decim_rate=options.decim)
self.u.set_mux(usrp.determine_rx_mux_value(self.u,
options.rx_subdev_spec))
+ self.cardtype = self.u.daughterboard_id(0)
+ print "daughtercard id is ", self.cardtype
# Set initial declination
self.decln = options.decln
@@ -424,8 +427,16 @@
the result of that operation and our target_frequency to
determine the value for the digital down converter.
"""
+ #
+ # Everything except BASIC_RX should support usrp.tune()
+ #
+ if not (self.cardtype == usrp_dbid.BASIC_RX):
r = usrp.tune(self.u, 0, self.subdev, target_freq)
-
+ else:
+ r = self.u.set_rx_freq(0, target_freq)
+ f = self.u.rx_freq(0)
+ if abs(f-target_freq) > 2.0e3:
+ r = 0
if r:
self.myform['freq'].set_value(target_freq) # update displayed
value
#
- [Commit-gnuradio] gr-radio-astronomy/src/python usrp_ra_receiver.py,
Marcus D. Leech <=