Changeset 9767

Show
Ignore:
Timestamp:
10/10/08 15:13:33
Author:
jblum
Message:

check for samples before autoscale, avoids potential error condition

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gnuradio/trunk/gr-wxgui/src/python/fft_window.py

    r9637 r9767  
    150150                if y_per_div not in DIV_LEVELS: y_per_div = DIV_LEVELS[0] 
    151151                #setup 
     152                self.samples = list() 
    152153                self.ext_controller = controller 
    153154                self.real = real 
     
    198199                Set the dynamic range and reference level. 
    199200                """ 
     201                if not len(self.samples): return 
    200202                #get the peak level (max of the samples) 
    201203                peak_level = numpy.max(self.samples) 
  • gnuradio/trunk/gr-wxgui/src/python/waterfall_window.py

    r9637 r9767  
    169169                pubsub.pubsub.__init__(self) 
    170170                #setup 
     171                self.samples = list() 
    171172                self.ext_controller = controller 
    172173                self.real = real 
     
    221222                Does not affect the current data in the waterfall. 
    222223                """ 
     224                if not len(self.samples): return 
    223225                #get the peak level (max of the samples) 
    224226                peak_level = numpy.max(self.samples)