update... still not useable

This commit is contained in:
Cort Buffington 2019-03-07 19:21:45 -06:00
parent 5ab34d93d8
commit 0677a2c772
3 changed files with 31 additions and 10 deletions

View File

@ -76,11 +76,9 @@ class HBP(HBSYSTEM):
def __init__(self, _name, _config, _report):
HBSYSTEM.__init__(self, _name, _config, _report)
self.last_stream = b'\x00'
self.threads = []
def play_voice(self):
print('start speech')
speech = pkt_gen(bytes_3(3120101), bytes_3(2), bytes_4(3120119), 0, [words['n0mjs']])
def play_voice(self, _rf_src, _tgid, _peer, _slot, _speech):
speech = pkt_gen(_rf_src, _tgid, _peer, _slot, _speech)
sleep(1)
while True:
@ -90,17 +88,15 @@ class HBP(HBSYSTEM):
break
sleep(.058)
self.send_system(pkt)
print(bhex(pkt))
print('end speech')
return None
def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data):
if (_frame_type == HBPF_DATA_SYNC) and (_dtype_vseq == HBPF_SLT_VTERM) and (_stream_id != self.last_stream):
print(int_id(_stream_id), int_id(self.last_stream))
self.last_stream = _stream_id
t = Thread(target=self.play_voice)
self.threads.append(t)
t.start()
#self.play_voice()
feedback = Thread(target=self.play_voice(bytes_3(3120101), bytes_3(2), bytes_4(3120119), 0, [words['n0mjs']]))
feedback.start()

View File

@ -45,6 +45,20 @@ BRIDGES = {
]
}
TELEMETRY = {
'WORLDWIDE': [
{'SYSTEM': 'MASTER-1', 'ON': [], 'OFF': []}
],
'ENGLISH': [
{'SYSTEM': 'MASTER-1', 'ON': [], 'OFF': []},
{'SYSTEM': 'REPEATER-1', 'ON': [], 'OFF': []}
],
'STATEWIDE': [
{'SYSTEM': 'MASTER-1', 'ON': [], 'OFF': []},
{'SYSTEM': 'REPEATER-1', 'ON': [], 'OFF': []}
]
}
if __name__ == '__main__':
from pprint import pprint
pprint(BRIDGES)

View File

@ -14,6 +14,17 @@ center of the packet.
from bitarray import bitarray
words = {
'activated': [
[bitarray('011100000100000000110100000000100010110110010100001001111101101011110111010100010101000100110110000000010010'), bitarray('111111110101000100101110100011000001010000110101000000010101001100000110110011100101000001111100100111100110')],
[bitarray('011100000111001000000101001001000110111011110111001001101111100010100100010100100101000000100111000001100111'), bitarray('111011000110010001001111100011010110010100000111000000100101000101010010110011100110011001111111100110000111')],
[bitarray('011000010100001100100101001000100101110011110011000101101111100111010101000000010000001101010011010100010101'), bitarray('101110001011100101101010101001001000000000100011000001100001011101110000101010101001100000111110100101001000')],
[bitarray('000100110000000001110010011000010110101010101000110000101001100001111010000000100000010001010010010101101100'), bitarray('000100010001110011110000111010011111001100100001000101100000011000000001110110111111111001111101110100011001')],
[bitarray('001100110001000101000001011000110000110110101001110000101010100101111010001100100010000001100011010100010100'), bitarray('110010101111110000111001100101001000000100000010011101100011010101011000010001110001100010100000110011011111')],
[bitarray('001100000010011001000000011001011010010101000001100010100011110011001000000000100011010001100001010001011010'), bitarray('010000110101110010110111110111101101010100010100011000010100010000111010001100101111010010000110110000100110')],
[bitarray('010100010100011000010111011100111010000101111011000010100110110000000010011100110110011100110101010100011000'), bitarray('001101001110000011100110111100100010010000100100011000000111010100011101001001111110011010010110111000000010')],
[bitarray('001000100001011000010010000001101010100010111000011111001110000011000100001000100001011000010010000001101010'), bitarray('100010111000011111001110000011000100001100010001011101110001010001101100010101000111111010010100100010101100')],
[bitarray('001000000010010001100011010101111110010100110001111011110011110011011110010100000100010000110111011100011110'), bitarray('001001011101001011110110110000000010010100100100011100010110010000011100001101101111010010110110110100110000')]
],
'n0mjs': [
[bitarray('100011101000010011100100000000000111011100111100100110111001010001000011111101011001100011000101000100100000'), bitarray('011101100001010011001011100100001111110101101010100111100111001100000010010001000111010010011000101100111101')],
[bitarray('111111001101011110100001001101010111000001110010000010101101000111001001111011001101010010000001000100110001'), bitarray('000001110001001110011101001111101110110011101100011110000001000101010011001000110110010010011111010110011111')],