summaryrefslogtreecommitdiff
path: root/gr-digital/examples/narrowband
diff options
context:
space:
mode:
authorTom Rondeau2012-01-16 10:09:01 -0500
committerTom Rondeau2012-01-16 10:09:01 -0500
commit58aba98d66be4024f9da62944b1cd440bdeae35e (patch)
treeb95ebbadfaef5a94d4aa250feb55d9c04ff03a25 /gr-digital/examples/narrowband
parente9ba60e518193ddcbfb069270bb674b4e7964f25 (diff)
downloadgnuradio-58aba98d66be4024f9da62944b1cd440bdeae35e.tar.gz
gnuradio-58aba98d66be4024f9da62944b1cd440bdeae35e.tar.bz2
gnuradio-58aba98d66be4024f9da62944b1cd440bdeae35e.zip
digital: fixing up BERT interfaces. Also added a gain control to the tx side (so options.amplitude is actually used).
Diffstat (limited to 'gr-digital/examples/narrowband')
-rwxr-xr-xgr-digital/examples/narrowband/digital_bert_rx.py2
-rwxr-xr-xgr-digital/examples/narrowband/digital_bert_tx.py7
2 files changed, 7 insertions, 2 deletions
diff --git a/gr-digital/examples/narrowband/digital_bert_rx.py b/gr-digital/examples/narrowband/digital_bert_rx.py
index 28331310d..dfed0eee7 100755
--- a/gr-digital/examples/narrowband/digital_bert_rx.py
+++ b/gr-digital/examples/narrowband/digital_bert_rx.py
@@ -113,9 +113,11 @@ class rx_psk_block(gr.top_block):
self._demodulator = self._demodulator_class(**demod_kwargs)
if(options.rx_freq is not None):
+ symbol_rate = options.bitrate / self._demodulator.bits_per_symbol()
self._source = uhd_receiver(options.args, options.bitrate,
options.samples_per_symbol,
options.rx_freq, options.rx_gain,
+ options.spec,
options.antenna, options.verbose)
options.samples_per_symbol = self._source._sps
diff --git a/gr-digital/examples/narrowband/digital_bert_tx.py b/gr-digital/examples/narrowband/digital_bert_tx.py
index 46f4f9097..f29e997af 100755
--- a/gr-digital/examples/narrowband/digital_bert_tx.py
+++ b/gr-digital/examples/narrowband/digital_bert_tx.py
@@ -67,9 +67,11 @@ class tx_psk_block(gr.top_block):
self._modulator = self._modulator_class(**mod_kwargs)
if(options.tx_freq is not None):
- self._sink = uhd_transmitter(options.args, options.bitrate,
+ symbol_rate = options.bitrate / self._modulator.bits_per_symbol()
+ self._sink = uhd_transmitter(options.args, symbol_rate,
options.samples_per_symbol,
options.tx_freq, options.tx_gain,
+ options.spec,
options.antenna, options.verbose)
options.samples_per_symbol = self._sink._sps
@@ -87,7 +89,8 @@ class tx_psk_block(gr.top_block):
verbose=options.verbose,
log=options.log)
- self.connect(self._transmitter, self._sink)
+ self.amp = gr.multiply_const_cc(options.amplitude)
+ self.connect(self._transmitter, self.amp, self._sink)
def get_options(mods):