diff options
Diffstat (limited to 'gr-digital')
-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) |