summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgr-uhd/apps/uhd_fft4
-rwxr-xr-xgr-uhd/apps/uhd_rx_nogui2
-rwxr-xr-xgr-uhd/examples/python/usrp_am_mw_rcv.py8
-rwxr-xr-xgr-uhd/examples/python/usrp_nbfm_ptt.py6
-rwxr-xr-xgr-uhd/examples/python/usrp_nbfm_rcv.py2
-rwxr-xr-xgr-uhd/examples/python/usrp_wfm_rcv.py2
-rwxr-xr-xgr-uhd/examples/python/usrp_wfm_rcv2_nogui.py2
-rwxr-xr-xgr-uhd/examples/python/usrp_wfm_rcv_fmdet.py2
-rwxr-xr-xgr-uhd/examples/python/usrp_wfm_rcv_nogui.py2
-rwxr-xr-xgr-uhd/examples/python/usrp_wfm_rcv_pll.py2
-rwxr-xr-xgr-uhd/examples/python/usrp_wfm_rcv_sca.py2
-rwxr-xr-xgr-uhd/examples/python/usrp_wxapt_rcv.py2
12 files changed, 19 insertions, 17 deletions
diff --git a/gr-uhd/apps/uhd_fft b/gr-uhd/apps/uhd_fft
index 7af2c5326..800a5fab8 100755
--- a/gr-uhd/apps/uhd_fft
+++ b/gr-uhd/apps/uhd_fft
@@ -118,6 +118,10 @@ class app_top_block(stdgui2.std_top_block):
average=options.averaging,
avg_alpha=options.avg_alpha,
fft_rate=options.fft_rate)
+ def fftsink_callback(x, y):
+ self.set_freq(x)
+
+ self.scope.set_callback(fftsink_callback)
self.frame.SetMinSize((800, 420))
self.connect(self.u, self.scope)
diff --git a/gr-uhd/apps/uhd_rx_nogui b/gr-uhd/apps/uhd_rx_nogui
index 9977f55a3..f0cfdd8be 100755
--- a/gr-uhd/apps/uhd_rx_nogui
+++ b/gr-uhd/apps/uhd_rx_nogui
@@ -231,7 +231,7 @@ def main():
parser.add_option("-p", "--ctcss", type="float",
default=None, metavar="FREQ",
help="set CTCSS squelch to FREQ [default=%default]")
- parser.add_option("-O", "--audio-output", type="string", default="",
+ parser.add_option("-O", "--audio-output", type="string", default="default",
help="pcm device name. E.g., hw:0,0 or surround51 or /dev/dsp")
parser.add_option("", "--show-async-msg", action="store_true", default=False,
help="Show asynchronous message notifications from UHD [default=%default]")
diff --git a/gr-uhd/examples/python/usrp_am_mw_rcv.py b/gr-uhd/examples/python/usrp_am_mw_rcv.py
index 28262f2bd..02863b32f 100755
--- a/gr-uhd/examples/python/usrp_am_mw_rcv.py
+++ b/gr-uhd/examples/python/usrp_am_mw_rcv.py
@@ -53,7 +53,7 @@ class wfm_rx_block (stdgui2.std_top_block):
help="set gain in dB (default is maximum)")
parser.add_option("-V", "--volume", type="eng_float", default=None,
help="set volume (default is midpoint)")
- parser.add_option("-O", "--audio-output", type="string", default="",
+ parser.add_option("-O", "--audio-output", type="string", default="default",
help="pcm device name. E.g., hw:0,0 or surround51 or /dev/dsp")
(options, args) = parser.parse_args()
@@ -138,10 +138,8 @@ class wfm_rx_block (stdgui2.std_top_block):
if options.gain is None:
g = self.u.get_gain_range()
- if True:
- # if no gain was specified, use the mid gain
- options.gain = (g.start() + g.stop())/2.0
- options.gain = g.stop()
+ # if no gain was specified, use the mid gain
+ options.gain = (g.start() + g.stop())/2.0
if options.volume is None:
v = self.volume_range()
diff --git a/gr-uhd/examples/python/usrp_nbfm_ptt.py b/gr-uhd/examples/python/usrp_nbfm_ptt.py
index 8d26e656e..791b8cb99 100755
--- a/gr-uhd/examples/python/usrp_nbfm_ptt.py
+++ b/gr-uhd/examples/python/usrp_nbfm_ptt.py
@@ -59,9 +59,9 @@ class ptt_block(stdgui2.std_top_block):
help="set rx gain [default=midpoint in dB]")
parser.add_option ("", "--tx-gain", type="eng_float", default=None,
help="set tx gain [default=midpoint in dB]")
- parser.add_option("-I", "--audio-input", type="string", default="",
+ parser.add_option("-I", "--audio-input", type="string", default="default",
help="pcm input device name. E.g., hw:0,0 or /dev/dsp")
- parser.add_option("-O", "--audio-output", type="string", default="",
+ parser.add_option("-O", "--audio-output", type="string", default="default",
help="pcm output device name. E.g., hw:0,0 or /dev/dsp")
parser.add_option ("-N", "--no-gui", action="store_true", default=False)
(options, args) = parser.parse_args ()
@@ -369,7 +369,7 @@ class transmit_path(gr.hier_block2):
# ////////////////////////////////////////////////////////////////////////
class receive_path(gr.hier_block2):
- def __init__(self, args, gain, audio_output):
+ def __init__(self, args, spec, antenna, gain, audio_output):
gr.hier_block2.__init__(self, "receive_path",
gr.io_signature(0, 0, 0), # Input signature
gr.io_signature(0, 0, 0)) # Output signature
diff --git a/gr-uhd/examples/python/usrp_nbfm_rcv.py b/gr-uhd/examples/python/usrp_nbfm_rcv.py
index 571abe8c9..be890f02d 100755
--- a/gr-uhd/examples/python/usrp_nbfm_rcv.py
+++ b/gr-uhd/examples/python/usrp_nbfm_rcv.py
@@ -50,7 +50,7 @@ class my_top_block (stdgui2.std_top_block):
help="set gain in dB (default is midpoint)")
parser.add_option("-V", "--volume", type="eng_float", default=None,
help="set volume (default is midpoint)")
- parser.add_option("-O", "--audio-output", type="string", default="",
+ parser.add_option("-O", "--audio-output", type="string", default="default",
help="pcm device name. E.g., hw:0,0 or surround51 or /dev/dsp")
parser.add_option("-N", "--no-gui", action="store_true", default=False)
diff --git a/gr-uhd/examples/python/usrp_wfm_rcv.py b/gr-uhd/examples/python/usrp_wfm_rcv.py
index bbb599033..9004469fc 100755
--- a/gr-uhd/examples/python/usrp_wfm_rcv.py
+++ b/gr-uhd/examples/python/usrp_wfm_rcv.py
@@ -46,7 +46,7 @@ class wfm_rx_block (stdgui2.std_top_block):
help="set gain in dB (default is midpoint)")
parser.add_option("-V", "--volume", type="eng_float", default=None,
help="set volume (default is midpoint)")
- parser.add_option("-O", "--audio-output", type="string", default="",
+ parser.add_option("-O", "--audio-output", type="string", default="default",
help="pcm device name. E.g., hw:0,0 or surround51 or /dev/dsp")
parser.add_option("", "--freq-min", type="eng_float", default=87.9e6,
help="Set a minimum frequency [default=%default]")
diff --git a/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py b/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py
index f7e72ae6f..dd4190b6d 100755
--- a/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py
+++ b/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py
@@ -44,7 +44,7 @@ class wfm_rx_block (gr.top_block):
help="set 2nd station freq to FREQ", metavar="FREQ")
parser.add_option("-g", "--gain", type="eng_float", default=40,
help="set gain in dB (default is midpoint)")
- parser.add_option("-O", "--audio-output", type="string", default="",
+ parser.add_option("-O", "--audio-output", type="string", default="default",
help="pcm device name. E.g., hw:0,0 or surround51 or /dev/dsp")
parser.add_option("", "--freq-min", type="eng_float", default=87.9e6,
help="Set a minimum frequency [default=%default]")
diff --git a/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py b/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py
index 514bd4faf..154f2456e 100755
--- a/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py
+++ b/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py
@@ -47,7 +47,7 @@ class wfm_rx_block (stdgui2.std_top_block):
help="set squelch level (default is 0)")
parser.add_option("-V", "--volume", type="eng_float", default=None,
help="set volume (default is midpoint)")
- parser.add_option("-O", "--audio-output", type="string", default="",
+ parser.add_option("-O", "--audio-output", type="string", default="default",
help="pcm device name. E.g., hw:0,0 or surround51 or /dev/dsp")
parser.add_option("", "--freq-min", type="eng_float", default=87.9e6,
help="Set a minimum frequency [default=%default]")
diff --git a/gr-uhd/examples/python/usrp_wfm_rcv_nogui.py b/gr-uhd/examples/python/usrp_wfm_rcv_nogui.py
index 7d042983e..9a7558dc7 100755
--- a/gr-uhd/examples/python/usrp_wfm_rcv_nogui.py
+++ b/gr-uhd/examples/python/usrp_wfm_rcv_nogui.py
@@ -44,7 +44,7 @@ class wfm_rx_block (gr.top_block):
help="set gain in dB (default is midpoint)")
parser.add_option("-V", "--volume", type="eng_float", default=None,
help="set volume (default is midpoint)")
- parser.add_option("-O", "--audio-output", type="string", default="",
+ parser.add_option("-O", "--audio-output", type="string", default="default",
help="pcm device name. E.g., hw:0,0 or surround51 or /dev/dsp")
parser.add_option("", "--freq-min", type="eng_float", default=87.9e6,
help="Set a minimum frequency [default=%default]")
diff --git a/gr-uhd/examples/python/usrp_wfm_rcv_pll.py b/gr-uhd/examples/python/usrp_wfm_rcv_pll.py
index 53b1e6fea..8cdabe87a 100755
--- a/gr-uhd/examples/python/usrp_wfm_rcv_pll.py
+++ b/gr-uhd/examples/python/usrp_wfm_rcv_pll.py
@@ -48,7 +48,7 @@ class wfm_rx_block (stdgui2.std_top_block):
help="set squelch level (default is 0)")
parser.add_option("-V", "--volume", type="eng_float", default=None,
help="set volume (default is midpoint)")
- parser.add_option("-O", "--audio-output", type="string", default="",
+ parser.add_option("-O", "--audio-output", type="string", default="default",
help="pcm device name. E.g., hw:0,0 or surround51 or /dev/dsp")
parser.add_option("", "--freq-min", type="eng_float", default=87.9e6,
help="Set a minimum frequency [default=%default]")
diff --git a/gr-uhd/examples/python/usrp_wfm_rcv_sca.py b/gr-uhd/examples/python/usrp_wfm_rcv_sca.py
index 646fe8587..f8ae778a9 100755
--- a/gr-uhd/examples/python/usrp_wfm_rcv_sca.py
+++ b/gr-uhd/examples/python/usrp_wfm_rcv_sca.py
@@ -76,7 +76,7 @@ class wfm_rx_sca_block (stdgui2.std_top_block):
help="set gain in dB (default is midpoint)")
parser.add_option("-V", "--volume", type="eng_float", default=None,
help="set volume (default is midpoint)")
- parser.add_option("-O", "--audio-output", type="string", default="",
+ parser.add_option("-O", "--audio-output", type="string", default="default",
help="pcm device name. E.g., hw:0,0 or surround51 or /dev/dsp")
parser.add_option("", "--freq-min", type="eng_float", default=87.9e6,
help="Set a minimum frequency [default=%default]")
diff --git a/gr-uhd/examples/python/usrp_wxapt_rcv.py b/gr-uhd/examples/python/usrp_wxapt_rcv.py
index 6b57de3bc..aaf297089 100755
--- a/gr-uhd/examples/python/usrp_wxapt_rcv.py
+++ b/gr-uhd/examples/python/usrp_wxapt_rcv.py
@@ -46,7 +46,7 @@ class wxapt_rx_block (stdgui2.std_top_block):
help="set gain in dB (default is midpoint)")
parser.add_option("-V", "--volume", type="eng_float", default=None,
help="set volume (default is midpoint)")
- parser.add_option("-O", "--audio-output", type="string", default="",
+ parser.add_option("-O", "--audio-output", type="string", default="default",
help="pcm device name. E.g., hw:0,0 or surround51 or /dev/dsp")
parser.add_option("", "--freq-min", type="eng_float", default=137e6,
help="Set a minimum frequency [default=%default]")