mirror of
https://github.com/ShaYmez/hblink3.git
synced 2024-11-21 15:41:49 -05:00
Update after fixing dmr_utils3
This commit is contained in:
parent
61842d1269
commit
71e6db2c48
@ -21,11 +21,10 @@
|
|||||||
from bitarray import bitarray
|
from bitarray import bitarray
|
||||||
from dmr_utils3 import bptc, golay, qr
|
from dmr_utils3 import bptc, golay, qr
|
||||||
from dmr_utils3.utils import bytes_3, bytes_4
|
from dmr_utils3.utils import bytes_3, bytes_4
|
||||||
from dmr_utils3.const import EMB, SLOT_TYPE, BS_VOICE_SYNC, BS_DATA_SYNC, LC_OPT
|
from dmr_utils3.const import EMB, SLOT_TYPE, BS_VOICE_SYNC, BS_DATA_SYNC, LC_OPT_G
|
||||||
from random import randint
|
from random import randint
|
||||||
from voice_lib import words
|
from voice_lib import words
|
||||||
|
|
||||||
LC_OPT = b'\x00\x00\x00'
|
|
||||||
|
|
||||||
# Precalculated "dmrbits" (DMRD packet byte 15) -- just (slot << 7 | this value) and you're good to go!
|
# Precalculated "dmrbits" (DMRD packet byte 15) -- just (slot << 7 | this value) and you're good to go!
|
||||||
HEADBITS = 0b00100001
|
HEADBITS = 0b00100001
|
||||||
@ -46,7 +45,7 @@ def pkt_gen(_rf_src, _dst_id, _peer, _slot, _phrase):
|
|||||||
# Calculate all of the static components up-front
|
# Calculate all of the static components up-front
|
||||||
STREAM_ID = bytes_4(randint(0x00, 0xFFFFFFFF))
|
STREAM_ID = bytes_4(randint(0x00, 0xFFFFFFFF))
|
||||||
SDP = _rf_src + _dst_id + _peer
|
SDP = _rf_src + _dst_id + _peer
|
||||||
LC = LC_OPT + _dst_id + _rf_src
|
LC = LC_OPT_G + _dst_id + _rf_src
|
||||||
|
|
||||||
HEAD_LC = bptc.encode_header_lc(LC)
|
HEAD_LC = bptc.encode_header_lc(LC)
|
||||||
HEAD_LC = [HEAD_LC[:98], HEAD_LC[-98:]]
|
HEAD_LC = [HEAD_LC[:98], HEAD_LC[-98:]]
|
||||||
|
Loading…
Reference in New Issue
Block a user