test pattern file utility

max
Max 5 years ago
parent a9fc0c206a
commit 3c50b3c54b
  1. 25
      op25/gr-op25_repeater/apps/tx/testpatterns/sources/make-bin.py

@ -0,0 +1,25 @@
#! /usr/bin/env python
"""
utility program to make binary symbol files
reads source file (stdin); writes binary file to stdout
"""
import sys
s = sys.stdin.read()
s= s.replace(' ', '')
s= s.replace('\n', '')
s = s.strip()
dibits = ''
while s:
s0 = int(s[0], 16)
s = s[1:]
dibits += chr(s0>>2)
dibits += chr(s0&3)
sys.stdout.write(dibits)
Loading…
Cancel
Save