From 71e6db2c480632d8b557a01f91ca49b5555d1451 Mon Sep 17 00:00:00 2001 From: n0mjs710 Date: Tue, 11 Feb 2020 15:42:58 -0600 Subject: [PATCH] Update after fixing dmr_utils3 --- mk_voice.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mk_voice.py b/mk_voice.py index 8f7c497..0fdf27a 100755 --- a/mk_voice.py +++ b/mk_voice.py @@ -21,11 +21,10 @@ from bitarray import bitarray from dmr_utils3 import bptc, golay, qr 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 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! HEADBITS = 0b00100001 @@ -46,7 +45,7 @@ def pkt_gen(_rf_src, _dst_id, _peer, _slot, _phrase): # Calculate all of the static components up-front STREAM_ID = bytes_4(randint(0x00, 0xFFFFFFFF)) 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 = [HEAD_LC[:98], HEAD_LC[-98:]]