debugging DMRBITS head and term

This commit is contained in:
n0mjs710 2019-08-27 16:33:35 -05:00
parent 6394a2d209
commit 43a5b89aa2
2 changed files with 5 additions and 18 deletions

View File

@ -30,6 +30,9 @@ HEADBITS = 0b00100001
BURSTBITS = [0b00010000,0b00000001,0b00000010,0b00000011,0b00000100,0b00000101]
TERMBITS = 0b00100010
HEADBITS = 0b00000000
TERMBITS = 0b00000000
# Need a bitstring of 4-bytes of zero for burst F
NULL_EMB_LC = bitarray(endian='big')
NULL_EMB_LC.frombytes(b'\x00\x00\x00\x00')

View File

@ -95,24 +95,8 @@ class HBP(HBSYSTEM):
print(int_id(_stream_id), int_id(self.last_stream))
self.last_stream = _stream_id
#feedback = Thread(target=self.play_voice(bytes_3(3120101), bytes_3(2), bytes_4(3120119), 0, [words['connected']]))
#feedback.start()
speech = pkt_gen(bytes_3(3120101), bytes_3(2), bytes_4(3120119), 0, [words['connected']])
sleep(4)
while True:
try:
pkt = next(speech)
except StopIteration:
break
sleep(.058)
dec = bhex(pkt)
print('TYPE:{} SEQ:{} SRC:{} DST:{} PEER:{} DMRBITS:{} STRID:{} PD1:{} EMB:{} PD2:{} TL:{}'.format(pkt[:4], pkt[4], int_id(pkt[5:8]), int_id(pkt[8:11]), int_id(pkt[11:15]), hex(pkt[15]), int_id(pkt[16:20]), bhex(pkt[20:34]), bhex(pkt[34:38]), bhex(pkt[38:-2]), bhex(pkt[-2:])))
self.send_system(pkt)
feedback = Thread(target=self.play_voice(bytes_3(3120102), bytes_3(2), bytes_4(3120119), 0, [words, ['kansas_link'], words['connected']]))
feedback.start()
#************************************************