diff options
author | jcorgan | 2007-09-20 03:34:02 +0000 |
---|---|---|
committer | jcorgan | 2007-09-20 03:34:02 +0000 |
commit | a64acfe8cef1fa73da333d0860b3da0c97a5eb45 (patch) | |
tree | 41ee22624f7d20867f2f25c665a8deb5d72da8b1 /gr-radar-mono/src/python/usrp_radar_mono.py | |
parent | afa44e7107019fa5207fde4baf9a6f477bd995e9 (diff) | |
download | gnuradio-a64acfe8cef1fa73da333d0860b3da0c97a5eb45.tar.gz gnuradio-a64acfe8cef1fa73da333d0860b3da0c97a5eb45.tar.bz2 gnuradio-a64acfe8cef1fa73da333d0860b3da0c97a5eb45.zip |
Merged r6475:6484 from jcorgan/radar into trunk.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6485 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-radar-mono/src/python/usrp_radar_mono.py')
-rwxr-xr-x | gr-radar-mono/src/python/usrp_radar_mono.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/gr-radar-mono/src/python/usrp_radar_mono.py b/gr-radar-mono/src/python/usrp_radar_mono.py index 077b798ca..a8ed9b8bf 100755 --- a/gr-radar-mono/src/python/usrp_radar_mono.py +++ b/gr-radar-mono/src/python/usrp_radar_mono.py @@ -32,8 +32,8 @@ logfile = None def process_echo(echo): global logfile - #sys.stdout.write('.') - logfile.write(echo) + if logfile is not None: + logfile.write(echo) def main(): global logfile @@ -71,14 +71,10 @@ def main(): parser.print_help() sys.exit(1) - if options.filename == None: - print "Must supply filename for logging received data." - sys.exit(1) - else: + if options.filename is not None: if options.verbose: print "Logging echo records to file: ", options.filename - - logfile = open(options.filename, 'wb') + logfile = open(options.filename, 'wb') r = radar(options, process_echo) @@ -88,11 +84,14 @@ def main(): r.set_prf(options.prf) r.set_amplitude(options.amplitude) r.set_freq(options.frequency, options.chirp_width) - + r.set_atrdel(64, 70) # TODO: parameterize + r.start() raw_input("Press ENTER to stop.") r.stop() - logfile.close() + + if logfile is not None: + logfile.close() if __name__ == "__main__": main() |