Hopefully fix the unreceivable P25 transmissions.

This commit is contained in:
Jonathan Naylor
2024-02-07 19:38:54 +00:00
parent da382647f6
commit 06a3da0f2e
2 changed files with 31 additions and 32 deletions

View File

@@ -361,7 +361,7 @@ bool CP25Control::writeModem(unsigned char* data, unsigned int len)
// Regenerate NID
m_nid.encode(data + 2U, P25_DUID_LDU2);
// Add the dummy LDU2 data
// Add the LDU2 data
m_rfData.encodeLDU2(data + 2U);
// Regenerate the Low Speed Data
@@ -960,7 +960,7 @@ void CP25Control::createRFHeader()
// Add the NID
m_nid.encode(buffer + 2U, P25_DUID_HEADER);
// Add the dummy header
// Add the header
m_rfData.encodeHeader(buffer + 2U);
// Add busy bits, inbound busy
@@ -995,18 +995,18 @@ void CP25Control::createNetHeader()
unsigned int dstId = (m_netLDU1[76U] << 16) + (m_netLDU1[77U] << 8) + m_netLDU1[78U];
unsigned int srcId = (m_netLDU1[101U] << 16) + (m_netLDU1[102U] << 8) + m_netLDU1[103U];
unsigned char algId = m_netLDU2[126U];
unsigned int kId = (m_netLDU2[127U] << 8) + m_netLDU2[128U];
// unsigned char algId = m_netLDU2[126U];
// unsigned int kId = (m_netLDU2[127U] << 8) + m_netLDU2[128U];
unsigned char mi[P25_MI_LENGTH_BYTES];
::memcpy(mi + 0U, m_netLDU2 + 51U, 3U);
::memcpy(mi + 3U, m_netLDU2 + 76U, 3U);
::memcpy(mi + 6U, m_netLDU2 + 101U, 3U);
// unsigned char mi[P25_MI_LENGTH_BYTES];
// ::memcpy(mi + 0U, m_netLDU2 + 51U, 3U);
// ::memcpy(mi + 3U, m_netLDU2 + 76U, 3U);
// ::memcpy(mi + 6U, m_netLDU2 + 101U, 3U);
m_netData.reset();
m_netData.setMI(mi);
m_netData.setAlgId(algId);
m_netData.setKId(kId);
// m_netData.setMI(mi);
// m_netData.setAlgId(algId);
// m_netData.setKId(kId);
m_netData.setLCF(lcf);
m_netData.setMFId(mfId);
m_netData.setSrcId(srcId);
@@ -1035,7 +1035,7 @@ void CP25Control::createNetHeader()
// Add the NID
m_nid.encode(buffer + 2U, P25_DUID_HEADER);
// Add the dummy header
// Add the header
m_netData.encodeHeader(buffer + 2U);
// Add busy bits
@@ -1121,7 +1121,7 @@ void CP25Control::createNetLDU2()
// Add the NID
m_nid.encode(buffer + 2U, P25_DUID_LDU2);
// Add the dummy LDU2 data
// Add the LDU2 data
m_netData.encodeLDU2(buffer + 2U);
// Add the Audio