aboutsummaryrefslogtreecommitdiffstats
path: root/op25/gr-op25_repeater
diff options
context:
space:
mode:
authorMax <ikj1234i@yahoo.com>2017-10-18 17:45:20 -0400
committerMax <ikj1234i@yahoo.com>2017-10-18 17:45:20 -0400
commite7d67538ae7f0a38ce530a42dea04ba45a9bf4b4 (patch)
treeb12c0a47371faf3079d98ed18f37af9fbc5d6201 /op25/gr-op25_repeater
parent77b21b5e32d094cbe5aca07f84a559af43398704 (diff)
fix excessive cpu usage in datascope plot
Diffstat (limited to 'op25/gr-op25_repeater')
-rw-r--r--op25/gr-op25_repeater/apps/gr_gnuplot.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/op25/gr-op25_repeater/apps/gr_gnuplot.py b/op25/gr-op25_repeater/apps/gr_gnuplot.py
index 58ccc72..2fe3c92 100644
--- a/op25/gr-op25_repeater/apps/gr_gnuplot.py
+++ b/op25/gr-op25_repeater/apps/gr_gnuplot.py
@@ -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)):