Simple minded rate 3/4 FEC decoding.

This commit is contained in:
Jonathan Naylor
2016-07-14 18:58:03 +01:00
parent 767c30ebf5
commit 9e83d23c48
3 changed files with 58 additions and 22 deletions

View File

@@ -365,11 +365,11 @@ void CDMRSlot::writeModem(unsigned char *data)
bptc.decode(data + 2U, payload);
bptc.encode(payload, data + 2U);
} else if (dataType == DT_RATE_34_DATA) {
LogDebug("DMR Slot %u, received RF rate 3/4 data", m_slotNo);
CDMRTrellis trellis;
unsigned char payload[18U];
trellis.decode(data + 2U, payload);
// trellis.encode(payload, data + 2U);
bool ret = trellis.decode(data + 2U, payload);
if (ret)
trellis.encode(payload, data + 2U);
}
// Regenerate the Slot Type
@@ -1164,11 +1164,11 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
bptc.decode(data + 2U, payload);
bptc.encode(payload, data + 2U);
} else if (dataType == DT_RATE_34_DATA) {
LogDebug("DMR Slot %u, received network rate 3/4 data", m_slotNo);
CDMRTrellis trellis;
unsigned char payload[18U];
trellis.decode(data + 2U, payload);
// trellis.encode(payload, data + 2U);
bool ret = trellis.decode(data + 2U, payload);
if (ret)
trellis.encode(payload, data + 2U);
}
// Regenerate the Slot Type