diff options
author | Max <ikj1234i@yahoo.com> | 2017-10-18 17:45:20 -0400 |
---|---|---|
committer | Max <ikj1234i@yahoo.com> | 2017-10-18 17:45:20 -0400 |
commit | e7d67538ae7f0a38ce530a42dea04ba45a9bf4b4 (patch) | |
tree | b12c0a47371faf3079d98ed18f37af9fbc5d6201 /op25/gr-op25_repeater | |
parent | 77b21b5e32d094cbe5aca07f84a559af43398704 (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.py | 7 |
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)): |