Merge branch 'master' into qtapp

This commit is contained in:
Nick Foster 2012-07-17 14:31:52 -07:00
commit 10f96bf35d

View File

@ -55,7 +55,7 @@ class adsb_rx_block (gr.top_block):
if options.filename is None and options.udp is None and not options.rtlsdr:
#UHD source by default
from gnuradio import uhd
self.u = uhd.single_usrp_source("", uhd.io_type_t.COMPLEX_FLOAT32, 1)
self.u = uhd.single_usrp_source(options.args, uhd.io_type_t.COMPLEX_FLOAT32, 1)
time_spec = uhd.time_spec(0.0)
self.u.set_time_now(time_spec)
@ -81,7 +81,7 @@ class adsb_rx_block (gr.top_block):
elif options.rtlsdr: #RTLSDR dongle
import osmosdr
self.u = osmosdr.source_c()
self.u = osmosdr.source_c(options.args)
self.u.set_sample_rate(2.4e6) #fixed for RTL dongles
if not self.u.set_center_freq(options.freq):
print "Failed to set initial frequency"
@ -143,6 +143,8 @@ if __name__ == '__main__':
help="select USRP Rx side A or B", metavar="SUBDEV")
parser.add_option("-A", "--antenna", type="string",
help="select which antenna to use on daughterboard")
parser.add_option("-D", "--args", type="string",
help="arguments to pass to UHD/RTL constructor", default="")
parser.add_option("-f", "--freq", type="eng_float", default=1090e6,
help="set receive frequency in Hz [default=%default]", metavar="FREQ")
parser.add_option("-g", "--gain", type="int", default=None,