summaryrefslogtreecommitdiff
path: root/gr-wxgui/src/python
diff options
context:
space:
mode:
authorjcorgan2008-02-24 01:42:50 +0000
committerjcorgan2008-02-24 01:42:50 +0000
commitc6bb9986f005bbc2da298c637cee6748bb377ae8 (patch)
tree16e2383dabaa8c331fc72672eab956987c45b180 /gr-wxgui/src/python
parent776da31eb84e146a8adf1e3ca7e017c1d9992ce3 (diff)
downloadgnuradio-c6bb9986f005bbc2da298c637cee6748bb377ae8.tar.gz
gnuradio-c6bb9986f005bbc2da298c637cee6748bb377ae8.tar.bz2
gnuradio-c6bb9986f005bbc2da298c637cee6748bb377ae8.zip
Fixed waterfallsink2 display with wxGTK-2.8, remove duplicated code. Thanks to Tobias Gresch.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7801 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-wxgui/src/python')
-rwxr-xr-xgr-wxgui/src/python/waterfallsink2.py27
1 files changed, 4 insertions, 23 deletions
diff --git a/gr-wxgui/src/python/waterfallsink2.py b/gr-wxgui/src/python/waterfallsink2.py
index 4b60391fb..1c5576e1a 100755
--- a/gr-wxgui/src/python/waterfallsink2.py
+++ b/gr-wxgui/src/python/waterfallsink2.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2003,2004,2005,2007 Free Software Foundation, Inc.
+# Copyright 2003,2004,2005,2007,2008 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -260,25 +260,6 @@ class waterfall_window (wx.Panel):
a.append(const)
return a
- def make_colormap(self):
- r = []
- r.extend(self.const_list(0,96))
- r.extend(range(0,255,4))
- r.extend(self.const_list(255,64))
- r.extend(range(255,128,-4))
-
- g = []
- g.extend(self.const_list(0,32))
- g.extend(range(0,255,4))
- g.extend(self.const_list(255,64))
- g.extend(range(255,0,-4))
- g.extend(self.const_list(0,32))
-
- b = range(128,255,4)
- b.extend(self.const_list(255,64))
- b.extend(range(255,0,-4))
- b.extend(self.const_list(0,96))
- return (r,g,b)
def set_data (self, evt):
dB = evt.data
@@ -313,18 +294,18 @@ class waterfall_window (wx.Panel):
value = int(dB[x_pos] * scale_factor)
value = min(255, max(0, value))
dc1.SetPen(self.pens[value])
- dc1.DrawRectangle(x_pos*p_width, 0, p_width, 1)
+ dc1.DrawRectangle(x_pos*p_width, 0, p_width, 2)
else: # complex fft
for x_pos in range(0, d_max): # positive freqs
value = int(dB[x_pos] * scale_factor)
value = min(255, max(0, value))
dc1.SetPen(self.pens[value])
- dc1.DrawRectangle(x_pos*p_width + d_max, 0, p_width, 1)
+ dc1.DrawRectangle(x_pos*p_width + d_max, 0, p_width, 2)
for x_pos in range(0 , d_max): # negative freqs
value = int(dB[x_pos+d_max] * scale_factor)
value = min(255, max(0, value))
dc1.SetPen(self.pens[value])
- dc1.DrawRectangle(x_pos*p_width, 0, p_width, 1)
+ dc1.DrawRectangle(x_pos*p_width, 0, p_width, 2)
self.DoDrawing (None)