diff options
author | Tom Rondeau | 2011-10-06 19:35:48 -0400 |
---|---|---|
committer | Tom Rondeau | 2011-10-06 19:35:48 -0400 |
commit | 3abc2178eaca897d8944e69ea0eccc07adb5e397 (patch) | |
tree | b748e84572251d76063be72755064621a91b400a | |
parent | 132a3c185b47263398d38b6b454e5c990b02b52f (diff) | |
download | gnuradio-3abc2178eaca897d8944e69ea0eccc07adb5e397.tar.gz gnuradio-3abc2178eaca897d8944e69ea0eccc07adb5e397.tar.bz2 gnuradio-3abc2178eaca897d8944e69ea0eccc07adb5e397.zip |
digital: fixed BERT test.
-rwxr-xr-x | gr-digital/examples/digital_bert_rx.py | 2 | ||||
-rwxr-xr-x | gr-digital/examples/digital_bert_tx.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/gr-digital/examples/digital_bert_rx.py b/gr-digital/examples/digital_bert_rx.py index 27dcc9d57..20659b1da 100755 --- a/gr-digital/examples/digital_bert_rx.py +++ b/gr-digital/examples/digital_bert_rx.py @@ -43,7 +43,7 @@ class status_thread(_threading.Thread): def run(self): while not self.done: - print "Freq. Offset: %5.0f Hz Timing Offset: %5.1f ppm Estimated SNR: %4.1f dB BER: %g" % ( + print "Freq. Offset: {0:5.0f} Hz Timing Offset: {1:10.1f} ppm Estimated SNR: {2:4.1f} dB BER: {3:g}".format( tb.frequency_offset(), tb.timing_offset()*1e6, tb.snr(), tb.ber()) try: time.sleep(1.0) diff --git a/gr-digital/examples/digital_bert_tx.py b/gr-digital/examples/digital_bert_tx.py index 7f2cbe7d7..6728398e1 100755 --- a/gr-digital/examples/digital_bert_tx.py +++ b/gr-digital/examples/digital_bert_tx.py @@ -44,12 +44,13 @@ class bert_transmit(gr.hier_block2): # Create BERT data bit stream self._bits = gr.vector_source_b([1,], True) # Infinite stream of ones self._scrambler = gr.scrambler_bb(0x8A, 0x7F, 7) # CCSDS 7-bit scrambler - self._pack = gr.unpacked_to_packed_bb(8, gr.GR_MSB_FIRST) self._mod = digital.generic_mod(constellation, samples_per_symbol, differential, excess_bw, gray_coded, verbose, log) + self._pack = gr.unpacked_to_packed_bb(self._mod.bits_per_symbol(), gr.GR_MSB_FIRST) + self.connect(self._bits, self._scrambler, self._pack, self._mod, self) |