TSBK to vPDU bug fix

This commit is contained in:
lwvmobile 2022-10-02 08:07:25 -04:00
parent 66fd3fd7bf
commit 14ba90a33f
2 changed files with 4 additions and 3 deletions

View File

@ -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;
}

View File

@ -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