summaryrefslogtreecommitdiff
path: root/gr-digital/examples/ofdm
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital/examples/ofdm')
-rwxr-xr-xgr-digital/examples/ofdm/benchmark_ofdm_rx.py16
-rw-r--r--gr-digital/examples/ofdm/receive_path.py7
2 files changed, 16 insertions, 7 deletions
diff --git a/gr-digital/examples/ofdm/benchmark_ofdm_rx.py b/gr-digital/examples/ofdm/benchmark_ofdm_rx.py
index 5ba161d28..6f8e59d98 100755
--- a/gr-digital/examples/ofdm/benchmark_ofdm_rx.py
+++ b/gr-digital/examples/ofdm/benchmark_ofdm_rx.py
@@ -25,6 +25,8 @@ from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
from optparse import OptionParser
+from gnuradio import digital
+
# from current dir
from receive_path import receive_path
from uhd_interface import uhd_receiver
@@ -90,15 +92,21 @@ def main():
expert_grp = parser.add_option_group("Expert")
parser.add_option("","--discontinuous", action="store_true", default=False,
help="enable discontinuous")
+ parser.add_option("","--from-file", default=None,
+ help="input file of samples to demod")
- my_top_block.add_options(parser, expert_grp)
receive_path.add_options(parser, expert_grp)
- blks2.ofdm_mod.add_options(parser, expert_grp)
- blks2.ofdm_demod.add_options(parser, expert_grp)
- fusb_options.add_options(expert_grp)
+ uhd_receiver.add_options(parser)
+ digital.ofdm_demod.add_options(parser, expert_grp)
(options, args) = parser.parse_args ()
+ if options.from_file is None:
+ if options.rx_freq is None:
+ sys.stderr.write("You must specify -f FREQ or --freq FREQ\n")
+ parser.print_help(sys.stderr)
+ sys.exit(1)
+
# build the graph
tb = my_top_block(rx_callback, options)
diff --git a/gr-digital/examples/ofdm/receive_path.py b/gr-digital/examples/ofdm/receive_path.py
index 06c9fb27a..8807b0dc2 100644
--- a/gr-digital/examples/ofdm/receive_path.py
+++ b/gr-digital/examples/ofdm/receive_path.py
@@ -19,9 +19,10 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr, blks2
+from gnuradio import gr
from gnuradio import eng_notation
from gnuradio import digital
+
import copy
import sys
@@ -44,8 +45,8 @@ class receive_path(gr.hier_block2):
self._rx_callback = rx_callback # this callback is fired when there's a packet available
# receiver
- self.ofdm_rx = blks2.ofdm_demod(options,
- callback=self._rx_callback)
+ self.ofdm_rx = digital.ofdm_demod(options,
+ callback=self._rx_callback)
# Carrier Sensing Blocks
alpha = 0.001