Revert "Remove rate 1/2 data regeneration."
This reverts commit bd338df210
.
This commit is contained in:
parent
bd338df210
commit
f824f044a3
1 changed files with 16 additions and 0 deletions
16
DMRSlot.cpp
16
DMRSlot.cpp
|
@ -311,6 +311,14 @@ void CDMRSlot::writeModem(unsigned char *data)
|
|||
if (m_rfState != RS_RF_DATA)
|
||||
return;
|
||||
|
||||
// Regenerate the payload if possible
|
||||
if (dataType == DT_RATE_12_DATA) {
|
||||
CBPTC19696 bptc;
|
||||
unsigned char payload[12U];
|
||||
bptc.decode(data + 2U, payload);
|
||||
bptc.encode(payload, data + 2U);
|
||||
}
|
||||
|
||||
// Regenerate the Slot Type
|
||||
slotType.getData(data + 2U);
|
||||
|
||||
|
@ -944,6 +952,14 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
if (m_netState != RS_NET_DATA)
|
||||
return;
|
||||
|
||||
// Regenerate the payload if possible
|
||||
if (dataType == DT_RATE_12_DATA) {
|
||||
CBPTC19696 bptc;
|
||||
unsigned char payload[12U];
|
||||
bptc.decode(data + 2U, payload);
|
||||
bptc.encode(payload, data + 2U);
|
||||
}
|
||||
|
||||
// Regenerate the Slot Type
|
||||
CDMRSlotType slotType;
|
||||
slotType.putData(data + 2U);
|
||||
|
|
Loading…
Reference in a new issue