From 7e3bf4f16c11d5cdf10e38e6f1d83e05b47b5e76 Mon Sep 17 00:00:00 2001
From: Cort Buffington <n0mjs@me.com>
Date: Wed, 27 Feb 2019 11:27:11 -0600
Subject: [PATCH] development computer sync

---
 mk_voice.py  | 1 +
 play_ambe.py | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/mk_voice.py b/mk_voice.py
index beea05d..b2fa292 100755
--- a/mk_voice.py
+++ b/mk_voice.py
@@ -77,6 +77,7 @@ 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
diff --git a/play_ambe.py b/play_ambe.py
index fb7716e..ea0a091 100755
--- a/play_ambe.py
+++ b/play_ambe.py
@@ -23,6 +23,7 @@ import sys
 from bitarray import bitarray
 from time import time, sleep
 from importlib import import_module
+from binascii import b2a_hex as bhex
 
 # Twisted is pretty important, so I keep it separate
 from twisted.internet.protocol import Factory, Protocol
@@ -79,7 +80,7 @@ class HBP(HBSYSTEM):
             print(int_id(_stream_id), int_id(self.last_stream))
             self.last_stream = _stream_id
             print('start speech')
-            speech = pkt_gen(bytes_3(312123), bytes_3(2), bytes_4(312123), 0, [words['all_circuits'], words['enabled'], words['3'], words['1'], words['2'], words['0']])
+            speech = pkt_gen(bytes_3(3120101), bytes_3(2), bytes_4(3120119), 0, [words['all_circuits'],words['all_circuits']])
     
             sleep(1)
             while True:
@@ -89,6 +90,7 @@ class HBP(HBSYSTEM):
                     break
                 sleep(.058)
                 self.send_system(pkt)
+                print(bhex(pkt))
             print('end speech')