summaryrefslogtreecommitdiff
path: root/gr-digital/examples/narrowband/benchmark_tx.py
diff options
context:
space:
mode:
authorTom Rondeau2011-10-19 10:23:53 -0700
committerTom Rondeau2011-10-19 10:23:53 -0700
commitb35d84eb447f44b547d928e5741feab7660c39e6 (patch)
treef7b93cc1a29b77b00a055657f7e8e8465c97e333 /gr-digital/examples/narrowband/benchmark_tx.py
parent41247b7598d7beb2e53947a7125b81e07996941e (diff)
downloadgnuradio-b35d84eb447f44b547d928e5741feab7660c39e6.tar.gz
gnuradio-b35d84eb447f44b547d928e5741feab7660c39e6.tar.bz2
gnuradio-b35d84eb447f44b547d928e5741feab7660c39e6.zip
digital: fixed digital narrowband examples to set the sample rate based on the symbol rate, not the bitrate, of the modulation.
Diffstat (limited to 'gr-digital/examples/narrowband/benchmark_tx.py')
-rwxr-xr-xgr-digital/examples/narrowband/benchmark_tx.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gr-digital/examples/narrowband/benchmark_tx.py b/gr-digital/examples/narrowband/benchmark_tx.py
index cc077bb28..25ed355da 100755
--- a/gr-digital/examples/narrowband/benchmark_tx.py
+++ b/gr-digital/examples/narrowband/benchmark_tx.py
@@ -43,7 +43,11 @@ class my_top_block(gr.top_block):
gr.top_block.__init__(self)
if(options.tx_freq is not None):
- self.sink = uhd_transmitter(options.args, options.bitrate,
+ # Work-around to get the modulation's bits_per_symbol
+ args = modulator.extract_kwargs_from_options(options)
+ symbol_rate = options.bitrate / modulator(**args).bits_per_symbol()
+
+ self.sink = uhd_transmitter(options.args, symbol_rate,
options.samples_per_symbol,
options.tx_freq, options.tx_gain,
options.antenna, options.verbose)