diff options
Diffstat (limited to 'gr-wxgui/src')
-rw-r--r-- | gr-wxgui/src/python/fft_window.py | 2 | ||||
-rw-r--r-- | gr-wxgui/src/python/waterfall_window.py | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/gr-wxgui/src/python/fft_window.py b/gr-wxgui/src/python/fft_window.py index e7affb1b0..6e54aec87 100644 --- a/gr-wxgui/src/python/fft_window.py +++ b/gr-wxgui/src/python/fft_window.py @@ -149,6 +149,7 @@ class fft_window(wx.Panel, pubsub.pubsub, common.prop_setter): #ensure y_per_div if y_per_div not in DIV_LEVELS: y_per_div = DIV_LEVELS[0] #setup + self.samples = list() self.ext_controller = controller self.real = real self.fft_size = fft_size @@ -197,6 +198,7 @@ class fft_window(wx.Panel, pubsub.pubsub, common.prop_setter): Autoscale the fft plot to the last frame. Set the dynamic range and reference level. """ + if not len(self.samples): return #get the peak level (max of the samples) peak_level = numpy.max(self.samples) #get the noise floor (averge the smallest samples) diff --git a/gr-wxgui/src/python/waterfall_window.py b/gr-wxgui/src/python/waterfall_window.py index 702f97099..f24b142a7 100644 --- a/gr-wxgui/src/python/waterfall_window.py +++ b/gr-wxgui/src/python/waterfall_window.py @@ -168,6 +168,7 @@ class waterfall_window(wx.Panel, pubsub.pubsub, common.prop_setter): ): pubsub.pubsub.__init__(self) #setup + self.samples = list() self.ext_controller = controller self.real = real self.fft_size = fft_size @@ -220,6 +221,7 @@ class waterfall_window(wx.Panel, pubsub.pubsub, common.prop_setter): Set the dynamic range and reference level. Does not affect the current data in the waterfall. """ + if not len(self.samples): return #get the peak level (max of the samples) peak_level = numpy.max(self.samples) #get the noise floor (averge the smallest samples) |