add unpack.py, fix dirs

max-skip-test
Max 9 years ago
parent b25a33e4fa
commit 9c93ad1d16
  1. 0
      op25/gr-op25_repeater/apps/tx/generate-tsbks.py
  2. 0
      op25/gr-op25_repeater/apps/tx/hackrf-tx.sh
  3. 0
      op25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py
  4. 0
      op25/gr-op25_repeater/apps/tx/op25_tx.py
  5. 0
      op25/gr-op25_repeater/apps/tx/p25craft.py
  6. 31
      op25/gr-op25_repeater/apps/tx/unpack.py

@ -0,0 +1,31 @@
#!/usr/bin/env python
from gnuradio import gr, gru, audio, eng_notation, blocks
from gnuradio.eng_option import eng_option
from optparse import OptionParser
class app_top_block(gr.top_block):
def __init__(self, options):
gr.top_block.__init__(self)
IN = blocks.file_source(gr.sizeof_char, options.input_file)
bits_per_symbol = 2
UNPACK = blocks.packed_to_unpacked_bb(bits_per_symbol, gr.GR_MSB_FIRST)
OUT = blocks.file_sink(gr.sizeof_char, options.output)
self.connect(IN, UNPACK, OUT)
def main():
parser = OptionParser(option_class=eng_option)
parser.add_option("-i", "--input-file", type="string", default="in.dat", help="specify the input file")
parser.add_option("-o", "--output", type="string", default="out.dat", help="specify the output file")
(options, args) = parser.parse_args()
tb = app_top_block(options)
try:
tb.run()
except KeyboardInterrupt:
tb.stop()
if __name__ == "__main__":
main()
Loading…
Cancel
Save