Skip to content

Commit

Permalink
Changes to improve DMR data efficiency.
Browse files Browse the repository at this point in the history
  • Loading branch information
g4klx committed Mar 14, 2016
1 parent 43fdf57 commit 1d4443e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions DMRDataHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,12 @@ void CDMRDataHeader::getTerminator(unsigned char* bytes) const
payload[10U] = parity[1U] ^ TERMINATOR_WITH_LC_CRC_MASK[1U];
payload[11U] = parity[0U] ^ TERMINATOR_WITH_LC_CRC_MASK[2U];

CUtils::dump(1U, "Data Terminator payload", payload, 12U);

CBPTC19696 bptc;
bptc.encode(payload, bytes);

CUtils::dump(1U, "Data Terminator bytes", bytes, DMR_FRAME_LENGTH_BYTES);
}

CDMRDataHeader& CDMRDataHeader::operator=(const CDMRDataHeader& header)
Expand Down
6 changes: 0 additions & 6 deletions DMRSlot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,6 @@ void CDMRSlot::writeModem(unsigned char *data)

writeEndRF();
} else if (dataType == DT_DATA_HEADER) {
if (m_rfState == RS_RF_DATA)
return;

CDMRDataHeader dataHeader;
bool valid = dataHeader.put(data + 2U);
if (!valid) {
Expand Down Expand Up @@ -754,9 +751,6 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
if (m_netBits == 0U) m_netBits = 1U;
LogMessage("DMR Slot %u, received network end of voice transmission, %.1f seconds, %u%% packet loss, BER: %.1f%%", m_slotNo, float(m_netFrames) / 16.667F, (m_netLost * 100U) / m_netFrames, float(m_netErrs * 100U) / float(m_netBits));
} else if (dataType == DT_DATA_HEADER) {
if (m_netState == RS_NET_DATA)
return;

CDMRDataHeader dataHeader;
bool valid = dataHeader.put(data + 2U);
if (!valid) {
Expand Down

0 comments on commit 1d4443e

Please sign in to comment.