Don't regenerate the Embedded LC.

This commit is contained in:
Jonathan Naylor 2016-12-04 14:40:55 +00:00
parent 055d52871e
commit 78e1abfcca

View file

@ -164,9 +164,6 @@ void CDMRSlot::writeModem(unsigned char *data, unsigned int len)
m_rfLC = lc;
// Store the LC for the embedded LC
m_rfEmbeddedLC.setData(*m_rfLC);
// Regenerate the LC data
fullLC.encode(*m_rfLC, data + 2U, DT_VOICE_LC_HEADER);
@ -445,15 +442,10 @@ void CDMRSlot::writeModem(unsigned char *data, unsigned int len)
if (m_rfState == RS_RF_AUDIO) {
m_rfN = data[1U] & 0x0FU;
// Regenerate the embedded LC
unsigned char lcss = m_rfEmbeddedLC.getData(data + 2U, m_rfN);
// Regenerate the EMB
CDMREMB emb;
emb.putData(data + 2U);
// Regenerate the EMB
emb.setColorCode(m_colorCode);
emb.setLCSS(lcss);
emb.getData(data + 2U);
unsigned int errors = 0U;
@ -502,9 +494,6 @@ void CDMRSlot::writeModem(unsigned char *data, unsigned int len)
m_rfLC = lc;
// Store the LC for the embedded LC
m_rfEmbeddedLC.setData(*m_rfLC);
// Create a dummy start frame to replace the received frame
unsigned char start[DMR_FRAME_LENGTH_BYTES + 2U];
@ -541,11 +530,7 @@ void CDMRSlot::writeModem(unsigned char *data, unsigned int len)
m_rfN = data[1U] & 0x0FU;
// Regenerate the embedded LC
unsigned char lcss = m_rfEmbeddedLC.getData(data + 2U, m_rfN);
// Regenerate the EMB
emb.setLCSS(lcss);
emb.getData(data + 2U);
// Send the original audio frame out
@ -1154,13 +1139,9 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
m_netErrs += m_fec.regenerateDMR(data + 2U);
m_netBits += 141U;
// Regenerate the embedded LC
unsigned char lcss = m_netEmbeddedLC.getData(data + 2U, dmrData.getN());
// Change the color code in the EMB
m_lastEMB.putData(data + 2U);
m_lastEMB.setColorCode(m_colorCode);
m_lastEMB.setLCSS(lcss);
m_lastEMB.getData(data + 2U);
data[0U] = TAG_DATA;