Fixing benchmark_tx to use usrp_options interface. Also changes the default power...
[debian/gnuradio] / gnuradio-examples / python / digital / transmit_path.py
index 11d37026940f23c50bd43b28ff210a02695903a2..9badcdc0840499d081bc0355c99e401cb2c45da2 100644 (file)
@@ -70,10 +70,10 @@ class transmit_path(gr.hier_block2):
 
     def set_tx_amplitude(self, ampl):
         """
-        Sets the transmit amplitude sent to the USRP
-        @param: ampl 0 <= ampl < 32768.  Try 8000
+        Sets the transmit amplitude sent to the USRP in volts
+        @param: ampl 0 <= ampl < 1.
         """
-        self._tx_amplitude = max(0.0, min(ampl, 32767.0))
+        self._tx_amplitude = max(0.0, min(ampl, 1))
         self.amp.set_k(self._tx_amplitude)
         
     def send_pkt(self, payload='', eof=False):
@@ -95,8 +95,8 @@ class transmit_path(gr.hier_block2):
         if not normal.has_option('--bitrate'):
             normal.add_option("-r", "--bitrate", type="eng_float", default=100e3,
                               help="specify bitrate [default=%default].")
-        normal.add_option("", "--tx-amplitude", type="eng_float", default=12000, metavar="AMPL",
-                          help="set transmitter digital amplitude: 0 <= AMPL < 32768 [default=%default]")
+        normal.add_option("", "--tx-amplitude", type="eng_float", default=0.250, metavar="AMPL",
+                          help="set transmitter digital amplitude: 0 <= AMPL < 1 [default=%default]")
         normal.add_option("-v", "--verbose", action="store_true", default=False)
 
         expert.add_option("-S", "--samples-per-symbol", type="int", default=2,