[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7288 - in gnuradio/branches/releases/3.1: gr-utils/sr
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r7288 - in gnuradio/branches/releases/3.1: gr-utils/src/python gr-wxgui/src/python |
Date: |
Thu, 27 Dec 2007 13:37:53 -0700 (MST) |
Author: jcorgan
Date: 2007-12-27 13:37:52 -0700 (Thu, 27 Dec 2007)
New Revision: 7288
Modified:
gnuradio/branches/releases/3.1/gr-utils/src/python/usrp_fft.py
gnuradio/branches/releases/3.1/gr-wxgui/src/python/fftsink2.py
Log:
Applied changeset r6839 on trunk to release branch.
Modified: gnuradio/branches/releases/3.1/gr-utils/src/python/usrp_fft.py
===================================================================
--- gnuradio/branches/releases/3.1/gr-utils/src/python/usrp_fft.py
2007-12-27 20:36:39 UTC (rev 7287)
+++ gnuradio/branches/releases/3.1/gr-utils/src/python/usrp_fft.py
2007-12-27 20:37:52 UTC (rev 7288)
@@ -235,7 +235,7 @@
self.myform['baseband'].set_value(r.baseband_freq)
self.myform['ddc'].set_value(r.dxc_freq)
if not self.options.waterfall and not self.options.oscilloscope:
- self.scope.set_baseband_freq(target_freq)
+ self.scope.win.set_baseband_freq(target_freq)
return True
return False
@@ -264,9 +264,16 @@
if event.CmdDown():
# Re-center on maximum power
points = self.scope.win._points
- ind = numpy.argmax(points[:,1])
+ if self.scope.win.peak_hold:
+ if self.scope.win.peak_vals is not None:
+ ind = numpy.argmax(self.scope.win.peak_vals)
+ else:
+ ind = int(points.shape()[0]/2)
+ else:
+ ind = numpy.argmax(points[:,1])
(freq, pwr) = points[ind]
target_freq = freq/self.scope.win._scale_factor
+ print ind, freq, pwr
self.set_freq(target_freq)
else:
# Re-center on clicked frequency
Modified: gnuradio/branches/releases/3.1/gr-wxgui/src/python/fftsink2.py
===================================================================
--- gnuradio/branches/releases/3.1/gr-wxgui/src/python/fftsink2.py
2007-12-27 20:36:39 UTC (rev 7287)
+++ gnuradio/branches/releases/3.1/gr-wxgui/src/python/fftsink2.py
2007-12-27 20:37:52 UTC (rev 7288)
@@ -256,6 +256,8 @@
self._format = "%3.3f"
def set_baseband_freq(self, baseband_freq):
+ if self.peak_hold:
+ self.peak_vals = None
self.set_scale(baseband_freq)
self.fftsink.set_baseband_freq(baseband_freq)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7288 - in gnuradio/branches/releases/3.1: gr-utils/src/python gr-wxgui/src/python,
jcorgan <=