From 43a5b89aa2e1030ec71d64f7bffcccbbe230600c Mon Sep 17 00:00:00 2001 From: n0mjs710 Date: Tue, 27 Aug 2019 16:33:35 -0500 Subject: [PATCH] debugging DMRBITS head and term --- mk_voice.py | 3 +++ play_ambe.py | 20 ++------------------ 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/mk_voice.py b/mk_voice.py index a06cf3c..308cfe1 100755 --- a/mk_voice.py +++ b/mk_voice.py @@ -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') diff --git a/play_ambe.py b/play_ambe.py index ccc87f8..69ff668 100755 --- a/play_ambe.py +++ b/play_ambe.py @@ -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() #************************************************