From 14ba90a33f07a23ed7f985f907451c8a53584c53 Mon Sep 17 00:00:00 2001 From: lwvmobile Date: Sun, 2 Oct 2022 08:07:25 -0400 Subject: [PATCH] TSBK to vPDU bug fix --- src/dsd_frame.c | 2 +- src/p25p1_tsbk.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dsd_frame.c b/src/dsd_frame.c index ef31c55..ee774d9 100644 --- a/src/dsd_frame.c +++ b/src/dsd_frame.c @@ -446,7 +446,7 @@ processFrame (dsd_opts * opts, dsd_state * state) if (new_nac != state->nac) { // NAC fixed by error correction state->nac = new_nac; - if (state->p2_hardset == 0) + if (state->p2_hardset == 0 && new_nac != 0) { state->p2_cc = new_nac; } diff --git a/src/p25p1_tsbk.c b/src/p25p1_tsbk.c index 8316780..1b83162 100644 --- a/src/p25p1_tsbk.c +++ b/src/p25p1_tsbk.c @@ -90,8 +90,9 @@ void processTSBK(dsd_opts * opts, dsd_state * state) PDU[7] = tsbk_byte[7]; PDU[8] = tsbk_byte[8]; PDU[9] = tsbk_byte[9]; - PDU[10] = tsbk_byte[10]; - PDU[11] = tsbk_byte[11]; + //remove CRC to prevent false positive when vPDU goes to look for additional message in block + PDU[10] = 0; //tsbk_byte[10]; + PDU[11] = 0; //tsbk_byte[11]; PDU[1] = PDU[1] ^ 0x40; //flip bit to make it compatible with MAC_PDUs, i.e. 3D to 7D //Don't run NET_STS out of this, or will set wrong NAC/CC