Revision c7dbfcc7 gnuradio-examples/python/ofdm/transmit_path.py

b/gnuradio-examples/python/ofdm/transmit_path.py
26 26
import copy
27 27
import sys
28 28

29
# from current dir
30
import ofdm
31

32 29
# /////////////////////////////////////////////////////////////////////////////
33 30
#                              transmit path
34 31
# /////////////////////////////////////////////////////////////////////////////
......
44 41
        self._verbose      = options.verbose
45 42
        self._tx_amplitude = options.tx_amplitude    # digital amplitude sent to USRP
46 43

47
        self.ofdm_mod = ofdm.ofdm_mod(fg, options)
48
        self.packet_transmitter = \
44
        self.ofdm_transmitter = \
49 45
            blks.mod_ofdm_pkts(fg,
50
                               self.ofdm_mod,
51
                               access_code=None,
46
                               options,
52 47
                               msgq_limit=4,
53
                               pad_for_usrp=True)
48
                               pad_for_usrp=False)
54 49

55 50
        self.amp = gr.multiply_const_cc(1)
56 51
        self.set_tx_amplitude(self._tx_amplitude)
......
60 55
            self._print_verbage()
61 56

62 57
        # Create and setup transmit path flow graph
63
        fg.connect(self.packet_transmitter, self.amp)
58
        fg.connect(self.ofdm_transmitter, self.amp)
64 59
        gr.hier_block.__init__(self, fg, None, self.amp)
65 60

66 61
    def set_tx_amplitude(self, ampl):
......
75 70
        """
76 71
        Calls the transmitter method to send a packet
77 72
        """
78
        return self.packet_transmitter.send_pkt(payload, eof)
73
        return self.ofdm_transmitter.send_pkt(payload, eof)
79 74
        
80 75
    def bitrate(self):
81 76
        return self._bitrate
......
87 82
        """
88 83
        Adds transmitter-specific options to the Options Parser
89 84
        """
90
        normal.add_option("", "--tx-amplitude", type="eng_float", default=12000, metavar="AMPL",
85
        normal.add_option("", "--tx-amplitude", type="eng_float", default=1, metavar="AMPL",
91 86
                          help="set transmitter digital amplitude: 0 <= AMPL < 32768 [default=%default]")
92 87
        normal.add_option("-v", "--verbose", action="store_true", default=False)
93 88
        expert.add_option("", "--log", action="store_true", default=False,

Also available in: Unified diff