[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r10815 - gnuradio/branches/developers/trondeau/qtdevel
From: |
trondeau |
Subject: |
[Commit-gnuradio] r10815 - gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/python |
Date: |
Sun, 12 Apr 2009 18:39:42 -0600 (MDT) |
Author: trondeau
Date: 2009-04-12 18:39:42 -0600 (Sun, 12 Apr 2009)
New Revision: 10815
Modified:
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/python/usrp_display.py
Log:
auto-set the frequency if not specified
Modified:
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/python/usrp_display.py
===================================================================
---
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/python/usrp_display.py
2009-04-12 21:09:57 UTC (rev 10814)
+++
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/python/usrp_display.py
2009-04-13 00:39:42 UTC (rev 10815)
@@ -71,7 +71,6 @@
def set_decim(self, decim):
self.decim = decim
self.bw = self.adc_rate / float(self.decim) / 1000.0
- #self.bwLabel.setText(QtCore.QString("(bw: %1 kHz)").arg(self.bw))
self.decimEdit.setText(QtCore.QString("%1").arg(self.decim))
def freqEditText(self):
@@ -151,7 +150,6 @@
rx_subdev_spec = (0,0)
self.u.set_mux(usrp.determine_rx_mux_value(self.u, rx_subdev_spec))
self.subdev = usrp.selected_subdev(self.u, rx_subdev_spec)
- r = self.u.tune(0, self.subdev, options.freq)
if options.gain is None:
# if no gain was specified, use the mid-point in dB
@@ -159,6 +157,12 @@
options.gain = float(g[0]+g[1])/2
self.subdev.set_gain(options.gain)
+ if options.freq is None:
+ # if no frequency was specified, use the mid-point of the subdev
+ f = self.subdev.freq_range()
+ options.freq = float(f[0]+f[1])/2
+ self.u.tune(0, self.subdev, options.freq)
+
fftsize = 2048
input_rate = self.u.converter_rate() / self.u.decim_rate()
self.snk = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r10815 - gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/python,
trondeau <=