[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/14: Print scan rate
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/14: Print scan rate |
Date: |
Wed, 6 May 2015 21:31:02 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit cab7c1eb5c0d323ade589f33e0703dd6fe9c237b
Author: Chris Kuethe <address@hidden>
Date: Sun May 3 16:05:00 2015 -0700
Print scan rate
Useful when scanning in a way that is likely to run slowly, doubly
so when multiple passes across the band are needed.
---
gr-uhd/examples/python/usrp_spectrum_sense.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gr-uhd/examples/python/usrp_spectrum_sense.py
b/gr-uhd/examples/python/usrp_spectrum_sense.py
index ba45a2e..b1ea6b4 100755
--- a/gr-uhd/examples/python/usrp_spectrum_sense.py
+++ b/gr-uhd/examples/python/usrp_spectrum_sense.py
@@ -33,6 +33,7 @@ import math
import struct
import threading
from datetime import datetime
+import time
sys.stderr.write("Warning: this may have issues on some machines+Python
version combinations to seg fault due to the callback in bin_statitics.\n\n")
@@ -271,6 +272,8 @@ def main_loop(tb):
bin_start = int(tb.fft_size * ((1 - 0.75) / 2))
bin_stop = int(tb.fft_size - bin_start)
+ timestamp = 0
+ centerfreq = 0
while 1:
# Get the next message sent from the C++ code (blocking call).
@@ -282,6 +285,15 @@ def main_loop(tb):
# m.raw_data is a string that contains the binary floats.
# You could write this as binary to a file.
+ # Scanning rate
+ if timestamp == 0:
+ timestamp = time.time()
+ centerfreq = m.center_freq
+ if m.center_freq < centerfreq:
+ sys.stderr.write("scanned %.1fMHz in %.1fs\n" % ((centerfreq -
m.center_freq)/1.0e6, time.time() - timestamp))
+ timestamp = time.time()
+ centerfreq = m.center_freq
+
for i_bin in range(bin_start, bin_stop):
center_freq = m.center_freq
- [Commit-gnuradio] [gnuradio] branch master updated (06a7a77 -> a693941), git, 2015/05/06
- [Commit-gnuradio] [gnuradio] 01/14: Print scan rate,
git <=
- [Commit-gnuradio] [gnuradio] 08/14: controlport: this fixes a complaint by newer versions of Boost., git, 2015/05/06
- [Commit-gnuradio] [gnuradio] 06/14: controlport: fixing complaints about no non-virtual dtor., git, 2015/05/06
- [Commit-gnuradio] [gnuradio] 09/14: Merge branch 'maint', git, 2015/05/06
- [Commit-gnuradio] [gnuradio] 02/14: uhd: Fixes for CID 1296559 and 1090067 and more, git, 2015/05/06
- [Commit-gnuradio] [gnuradio] 05/14: controlport: build: allowing ControlPort and probes in static builds., git, 2015/05/06
- [Commit-gnuradio] [gnuradio] 04/14: uhd: Updated frequency hopping example to do DSP tuning only, git, 2015/05/06
- [Commit-gnuradio] [gnuradio] 12/14: Merge remote-tracking branch 'mbant/uhd/cids-59-67-master', git, 2015/05/06
- [Commit-gnuradio] [gnuradio] 10/14: Merge remote-tracking branch 'ckuethe/spectrum_sense', git, 2015/05/06
- [Commit-gnuradio] [gnuradio] 11/14: Merge remote-tracking branch 'trondeau/controlport/cleaning_up', git, 2015/05/06
- [Commit-gnuradio] [gnuradio] 07/14: controlport: android: cleaning up; better logs; help to support android., git, 2015/05/06