summaryrefslogtreecommitdiff
path: root/gr-uhd
diff options
context:
space:
mode:
Diffstat (limited to 'gr-uhd')
-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.py4
-rwxr-xr-xgr-uhd/examples/python/usrp_nbfm_rcv.py2
-rwxr-xr-xgr-uhd/examples/python/usrp_wfm_rcv.py4
-rwxr-xr-xgr-uhd/examples/python/usrp_wfm_rcv2_nogui.py4
-rwxr-xr-xgr-uhd/examples/python/usrp_wfm_rcv_fmdet.py4
-rwxr-xr-xgr-uhd/examples/python/usrp_wfm_rcv_nogui.py2
-rwxr-xr-xgr-uhd/examples/python/usrp_wfm_rcv_pll.py4
-rwxr-xr-xgr-uhd/examples/python/usrp_wfm_rcv_sca.py4
-rwxr-xr-xgr-uhd/examples/python/usrp_wxapt_rcv.py2
12 files changed, 23 insertions, 21 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 cf992a5f2..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 ()
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..8ec08260a 100755
--- a/gr-uhd/examples/python/usrp_wfm_rcv.py
+++ b/gr-uhd/examples/python/usrp_wfm_rcv.py
@@ -42,11 +42,11 @@ class wfm_rx_block (stdgui2.std_top_block):
help="select Rx Antenna where appropriate")
parser.add_option("-f", "--freq", type="eng_float", default=100.1e6,
help="set frequency to FREQ", metavar="FREQ")
- parser.add_option("-g", "--gain", type="eng_float", default=40,
+ parser.add_option("-g", "--gain", type="eng_float", default=None,
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..83f1726c4 100755
--- a/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py
+++ b/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py
@@ -42,9 +42,9 @@ class wfm_rx_block (gr.top_block):
help="set 1st station frequency to FREQ", metavar="FREQ")
parser.add_option("", "--f2", type="eng_float", default=102.5e6,
help="set 2nd station freq to FREQ", metavar="FREQ")
- parser.add_option("-g", "--gain", type="eng_float", default=40,
+ parser.add_option("-g", "--gain", type="eng_float", default=None,
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..967a3bd8f 100755
--- a/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py
+++ b/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py
@@ -41,13 +41,13 @@ class wfm_rx_block (stdgui2.std_top_block):
help="select Rx Antenna where appropriate")
parser.add_option("-f", "--freq", type="eng_float", default=100.1e6,
help="set frequency to FREQ", metavar="FREQ")
- parser.add_option("-g", "--gain", type="eng_float", default=65,
+ parser.add_option("-g", "--gain", type="eng_float", default=None,
help="set gain in dB (default is midpoint)")
parser.add_option("-s", "--squelch", type="eng_float", default=0,
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..874cab4a8 100755
--- a/gr-uhd/examples/python/usrp_wfm_rcv_pll.py
+++ b/gr-uhd/examples/python/usrp_wfm_rcv_pll.py
@@ -42,13 +42,13 @@ class wfm_rx_block (stdgui2.std_top_block):
help="select Rx Antenna where appropriate")
parser.add_option("-f", "--freq", type="eng_float", default=100.1e6,
help="set frequency to FREQ", metavar="FREQ")
- parser.add_option("-g", "--gain", type="eng_float", default=65,
+ parser.add_option("-g", "--gain", type="eng_float", default=None,
help="set gain in dB (default is midpoint)")
parser.add_option("-s", "--squelch", type="eng_float", default=0,
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..4c6aec23f 100755
--- a/gr-uhd/examples/python/usrp_wfm_rcv_sca.py
+++ b/gr-uhd/examples/python/usrp_wfm_rcv_sca.py
@@ -72,11 +72,11 @@ class wfm_rx_sca_block (stdgui2.std_top_block):
help="select Rx Antenna where appropriate")
parser.add_option("-f", "--freq", type="eng_float", default=100.1e6,
help="set frequency to FREQ", metavar="FREQ")
- parser.add_option("-g", "--gain", type="eng_float", default=40,
+ parser.add_option("-g", "--gain", type="eng_float", default=None,
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]")