commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r8494 - usrp2/trunk/host/apps


From: eb
Subject: [Commit-gnuradio] r8494 - usrp2/trunk/host/apps
Date: Sun, 25 May 2008 18:34:12 -0600 (MDT)

Author: eb
Date: 2008-05-25 18:34:11 -0600 (Sun, 25 May 2008)
New Revision: 8494

Modified:
   usrp2/trunk/host/apps/streaming_fft.py
Log:
added -g option to streaming_fft.py

Modified: usrp2/trunk/host/apps/streaming_fft.py
===================================================================
--- usrp2/trunk/host/apps/streaming_fft.py      2008-05-26 00:23:25 UTC (rev 
8493)
+++ usrp2/trunk/host/apps/streaming_fft.py      2008-05-26 00:34:11 UTC (rev 
8494)
@@ -31,6 +31,8 @@
                       help="set fgpa decimation rate to DECIM 
[default=%default]")
     parser.add_option("-f", "--freq", type="eng_float", default=0.0,
                       help="set frequency to FREQ", metavar="FREQ")
+    parser.add_option("-g", "--gain", type="string", default=None,
+                      help="set gain to GAIN [default=%default]")
     parser.add_option("-W", "--waterfall", action="store_true", default=False,
                       help="Enable waterfall display")
     parser.add_option("-S", "--oscilloscope", action="store_true", 
default=False,
@@ -57,8 +59,12 @@
     if options.oscilloscope:
         display_type = '-S'
 
-    cmd = "sudo %s/rx_streaming_samples -e %s -f %g -d %d -F %d -o 
/proc/self/fd/1 | %s/stdin_int32_fft.py %s -f %g -d %d" % (
-        path, options.eth, options.freq, options.decim, 
options.samples_per_frame,
+    gain_clause = ''
+    if options.gain:
+        gain_clause = '-g ' + options.gain
+
+    cmd = "sudo %s/rx_streaming_samples -e %s -f %g -d %d -F %d %s -o 
/proc/self/fd/1 | %s/stdin_int32_fft.py %s -f %g -d %d" % (
+        path, options.eth, options.freq, options.decim, 
options.samples_per_frame, gain_clause,
         path, display_type, options.freq, options.decim)
 
     print cmd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]