summaryrefslogtreecommitdiff
path: root/gr-pager/apps
diff options
context:
space:
mode:
Diffstat (limited to 'gr-pager/apps')
-rw-r--r--gr-pager/apps/.gitignore2
-rw-r--r--gr-pager/apps/CMakeLists.txt14
-rw-r--r--gr-pager/apps/Makefile.am36
-rwxr-xr-xgr-pager/apps/usrp_flex (renamed from gr-pager/apps/usrp_flex.py)28
-rwxr-xr-xgr-pager/apps/usrp_flex_all (renamed from gr-pager/apps/usrp_flex_all.py)20
-rwxr-xr-xgr-pager/apps/usrp_flex_band (renamed from gr-pager/apps/usrp_flex_band.py)18
6 files changed, 40 insertions, 78 deletions
diff --git a/gr-pager/apps/.gitignore b/gr-pager/apps/.gitignore
deleted file mode 100644
index 282522db0..000000000
--- a/gr-pager/apps/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/gr-pager/apps/CMakeLists.txt b/gr-pager/apps/CMakeLists.txt
index 1965c6e66..a02cad56e 100644
--- a/gr-pager/apps/CMakeLists.txt
+++ b/gr-pager/apps/CMakeLists.txt
@@ -1,17 +1,17 @@
# Copyright 2011 Free Software Foundation, Inc.
-#
+#
# This file is part of GNU Radio
-#
+#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
-#
+#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
@@ -21,9 +21,9 @@ include(GrPython)
GR_PYTHON_INSTALL(
PROGRAMS
- usrp_flex.py
- usrp_flex_all.py
- usrp_flex_band.py
+ usrp_flex
+ usrp_flex_all
+ usrp_flex_band
DESTINATION ${GR_RUNTIME_DIR}
COMPONENT "pager_python"
)
diff --git a/gr-pager/apps/Makefile.am b/gr-pager/apps/Makefile.am
deleted file mode 100644
index a320ffefc..000000000
--- a/gr-pager/apps/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Copyright 2009,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-include $(top_srcdir)/Makefile.common
-
-if PYTHON
-
-dist_bin_SCRIPTS = \
- usrp_flex.py \
- usrp_flex_all.py \
- usrp_flex_band.py
-
-noinst_PYTHON = \
- usrp_rx_flex.py
-endif
-
-EXTRA_DIST += \
- usrp_rx_flex.grc
diff --git a/gr-pager/apps/usrp_flex.py b/gr-pager/apps/usrp_flex
index 7d0d66a95..33877ea4e 100755
--- a/gr-pager/apps/usrp_flex.py
+++ b/gr-pager/apps/usrp_flex
@@ -1,24 +1,24 @@
#!/usr/bin/env python
#
# Copyright 2006,2007,2009,2011 Free Software Foundation, Inc.
-#
+#
# This file is part of GNU Radio
-#
+#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
-#
+#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
+#
from gnuradio import gr, gru, uhd, optfir, eng_notation, pager
from gnuradio.eng_option import eng_option
@@ -32,7 +32,7 @@ class app_top_block(gr.top_block):
self.offset = 0.0
self.adj_time = time.time()
self.verbose = options.verbose
-
+
if options.from_file is None:
# Set up USRP source
self.u = uhd.usrp_source(device_addr=options.address, stream_args=uhd.stream_args('fc32'))
@@ -44,7 +44,7 @@ class app_top_block(gr.top_block):
if rate != 250e3:
print "Unable to set required sample rate of 250 Ksps (got %f)" % rate
sys.exit(1)
-
+
# Tune daughterboard
r = self.u.set_center_freq(options.freq+options.calibration, 0)
if not r:
@@ -60,15 +60,15 @@ class app_top_block(gr.top_block):
print "\nNo gain specified."
print "Setting gain to %f (from [%f, %f])" % \
(options.rx_gain, grange.start(), grange.stop())
-
+
self.u.set_gain(options.rx_gain, 0)
-
+
else:
# Use supplied file as source of samples
self.u = gr.file_source(gr.sizeof_gr_complex, options.from_file)
if options.verbose:
print "Reading samples from", options.from_file
-
+
if options.log and not options.from_file:
usrp_sink = gr.file_sink(gr.sizeof_gr_complex, 'usrp.dat')
self.connect(self.u, usrp_sink)
@@ -81,7 +81,7 @@ class app_top_block(gr.top_block):
12500, # One-sided channel bandwidth
0.1, # Passband ripple
60) # Stopband attenuation
-
+
if options.verbose:
print "Channel filter has", len(taps), "taps."
@@ -109,7 +109,7 @@ class app_top_block(gr.top_block):
self.chan.set_center_freq(self.offset)
if self.verbose:
print "Channel frequency offset (Hz):", int(self.offset)
-
+
def get_options():
parser = OptionParser(option_class=eng_option)
@@ -140,7 +140,7 @@ def get_options():
if (options.freq is None):
sys.stderr.write("You must specify -f FREQ or --freq FREQ\n")
sys.exit(1)
-
+
return (options, args)
if __name__ == "__main__":
@@ -151,7 +151,7 @@ if __name__ == "__main__":
queue = gr.msg_queue()
tb = app_top_block(options, queue)
runner = pager.queue_runner(queue)
-
+
try:
tb.run()
except KeyboardInterrupt:
diff --git a/gr-pager/apps/usrp_flex_all.py b/gr-pager/apps/usrp_flex_all
index 36bd90034..75c4c1e73 100755
--- a/gr-pager/apps/usrp_flex_all.py
+++ b/gr-pager/apps/usrp_flex_all
@@ -1,24 +1,24 @@
#!/usr/bin/env python
#
# Copyright 2006,2007,2009 Free Software Foundation, Inc.
-#
+#
# This file is part of GNU Radio
-#
+#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
-#
+#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
+#
from gnuradio import gr, gru, uhd, optfir, eng_notation, blks2, pager
from gnuradio.eng_option import eng_option
@@ -59,7 +59,7 @@ class app_top_block(gr.top_block):
print "\nNo gain specified."
print "Setting gain to %f (from [%f, %f])" % \
(options.rx_gain, grange.start(), grange.stop())
-
+
self.u.set_gain(options.rx_gain, 0)
# Grab >=3 MHz of spectrum, evenly divisible by 25 KHz channels
@@ -74,11 +74,11 @@ class app_top_block(gr.top_block):
if (rate != 3.2e6):
print "Unable to set required sample rate for >= 3MHz of 25 KHz channels."
sys.exit(1)
-
+
self.nchan = int(rate/25e3)
if options.verbose:
print "\nReceiving", rate/1e6, "MHz of bandwidth containing", self.nchan, "baseband channels."
-
+
taps = gr.firdes.low_pass(1.0,
1.0,
1.0/self.nchan*0.4,
@@ -143,7 +143,7 @@ def get_options():
sys.exit(1)
return (options, args)
-
+
def main():
@@ -159,6 +159,6 @@ def main():
pass
runner.end()
-
+
if __name__ == "__main__":
main()
diff --git a/gr-pager/apps/usrp_flex_band.py b/gr-pager/apps/usrp_flex_band
index 63fb93fa1..5ec0065d6 100755
--- a/gr-pager/apps/usrp_flex_band.py
+++ b/gr-pager/apps/usrp_flex_band
@@ -1,24 +1,24 @@
#!/usr/bin/env python
#
# Copyright 2006,2007,2009,2011 Free Software Foundation, Inc.
-#
+#
# This file is part of GNU Radio
-#
+#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
-#
+#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
+#
from gnuradio import gr, gru, uhd, optfir, eng_notation, blks2, pager
from gnuradio.eng_option import eng_option
@@ -44,7 +44,7 @@ class app_top_block(gr.top_block):
if rate != 1e6:
print "Unable to set required sample rate of 1 Msps (got %f)" % rate
sys.exit(1)
-
+
# Tune daughterboard
r = self.u.set_center_freq(options.freq+options.calibration, 0)
if not r:
@@ -60,7 +60,7 @@ class app_top_block(gr.top_block):
print "\nNo gain specified."
print "Setting gain to %f (from [%f, %f])" % \
(options.rx_gain, grange.start(), grange.stop())
-
+
self.u.set_gain(options.rx_gain, 0)
@@ -120,10 +120,10 @@ def get_options():
if (options.freq is None):
sys.stderr.write("You must specify -f FREQ or --freq FREQ\n")
sys.exit(1)
-
+
return (options, args)
-
+
if __name__ == "__main__":
(options, args) = get_options()