WORK IN PROGRESS - NOT FOR GENERAL USE

This commit is contained in:
Cort Buffington
2019-03-07 06:35:23 -06:00
parent ffd6d56dad
commit 5ab34d93d8
4 changed files with 287 additions and 190 deletions

View File

@@ -77,7 +77,6 @@ def pkt_gen(_rf_src, _dst_id, _peer, _slot, _phrase):
# Send each burst, six bursts per Superframe rotating through with the proper EMBED value per burst A-F
for word in _phrase:
for burst in range(0, len(word)):
print(burst)
pkt = b'DMRD' + bytes([SEQ]) + SDP + bytes([_slot << 7 | BURSTBITS[burst % 6]]) + STREAM_ID + (word[burst + 0][0] + EMBED[burst % 6] + word[burst + 0][1]).tobytes() + TAIL
SEQ = (SEQ + 1) % 0x100
yield pkt
@@ -94,7 +93,7 @@ def pkt_gen(_rf_src, _dst_id, _peer, _slot, _phrase):
if __name__ == '__main__':
from time import time
speech = pkt_gen(bytes_3(3120101), bytes_3(3120), bytes_4(312000), 0, [words['all_circuits'], words['all_circuits']])
speech = pkt_gen(bytes_3(3120101), bytes_3(3120), bytes_4(312000), 0, [words['n0mjs']])
while True: