fix excessive cpu usage in datascope plot
This commit is contained in:
parent
77b21b5e32
commit
e7d67538ae
|
@ -46,6 +46,7 @@ class wrap_gp(object):
|
|||
self.freqs = ()
|
||||
self.avg_pwr = np.zeros(FFT_BINS)
|
||||
self.buf = []
|
||||
self.plot_count = 0
|
||||
|
||||
self.attach_gp()
|
||||
|
||||
|
@ -65,6 +66,12 @@ class wrap_gp(object):
|
|||
self.buf.extend(buf[:consumed])
|
||||
if len(self.buf) < BUFSZ:
|
||||
return consumed
|
||||
|
||||
self.plot_count += 1
|
||||
if mode == 'eye' and self.plot_count % 20 != 0:
|
||||
self.buf = []
|
||||
return consumed
|
||||
|
||||
plots = []
|
||||
s = ''
|
||||
while(len(self.buf)):
|
||||
|
|
Loading…
Reference in New Issue