Skip to content

Commit

Permalink
Merged branch master into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
g0wfv committed Sep 29, 2016
2 parents 983b0b9 + 897d8c7 commit 9dc58c2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
6 changes: 3 additions & 3 deletions Conf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ m_fusionEnabled(true),
m_fusionRemoteGateway(false),
m_p25Enabled(true),
m_p25NAC(0x293U),
m_dstarNetworkEnabled(true),
m_dstarNetworkEnabled(false),
m_dstarGatewayAddress(),
m_dstarGatewayPort(0U),
m_dstarLocalPort(0U),
m_dstarNetworkDebug(false),
m_dmrNetworkEnabled(true),
m_dmrNetworkEnabled(false),
m_dmrNetworkAddress(),
m_dmrNetworkPort(0U),
m_dmrNetworkLocal(0U),
Expand All @@ -139,7 +139,7 @@ m_fusionNetworkMyPort(0U),
m_fusionNetworkGwyAddress(),
m_fusionNetworkGwyPort(0U),
m_fusionNetworkDebug(false),
m_p25NetworkEnabled(true),
m_p25NetworkEnabled(false),
m_p25GatewayAddress(),
m_p25GatewayPort(0U),
m_p25LocalPort(0U),
Expand Down
24 changes: 12 additions & 12 deletions P25Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,13 @@ void CP25Control::writeNetwork()
break;
case 0x6AU:
::memcpy(m_netLDU1 + 200U, data, 16U);
if (m_netState != RS_NET_IDLE)
if (m_netState != RS_NET_IDLE) {
// Check for an unflushed LDU2
void* p = ::memchr(m_netLDU2, 0x02U, 9U * 25U);
if (p != NULL)
createNetLDU2();
createNetLDU1();
}
break;
case 0x6BU:
::memcpy(m_netLDU2 + 0U, data, 22U);
Expand Down Expand Up @@ -366,9 +371,14 @@ void CP25Control::writeNetwork()
break;
case 0x73U:
::memcpy(m_netLDU2 + 200U, data, 16U);
if (m_netState != RS_NET_IDLE) {
if (m_netState == RS_NET_IDLE) {
createNetHeader();
createNetLDU1();
} else {
// Check for an unflushed LDU1
void* p = ::memchr(m_netLDU1, 0x02U, 9U * 25U);
if (p != NULL)
createNetLDU1();
}
createNetLDU2();
break;
Expand Down Expand Up @@ -641,11 +651,6 @@ void CP25Control::createNetHeader()

void CP25Control::createNetLDU1()
{
// Check for an unflushed LDU2
void* p = ::memchr(m_netLDU2, 0x02U, 9U * 25U);
if (p != NULL)
createNetLDU2();

insertMissingAudio(m_netLDU1);

unsigned char buffer[P25_LDU_FRAME_LENGTH_BYTES + 2U];
Expand Down Expand Up @@ -695,11 +700,6 @@ void CP25Control::createNetLDU1()

void CP25Control::createNetLDU2()
{
// Check for an unflushed LDU1
void* p = ::memchr(m_netLDU1, 0x02U, 9U * 25U);
if (p != NULL)
createNetLDU1();

insertMissingAudio(m_netLDU2);

unsigned char buffer[P25_LDU_FRAME_LENGTH_BYTES + 2U];
Expand Down
4 changes: 1 addition & 3 deletions P25Data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,8 @@ bool CP25Data::decodeLDU1(const unsigned char* data)
decodeLDUHamming(raw, rs + 15U);

bool ret = m_rs241213.decode(rs);
if (!ret) {
LogDebug("P25, uncorrectable errors in the RS(24,12,13) code");
if (!ret)
return false;
}

switch (m_lcf) {
case P25_LCF_GROUP:
Expand Down

0 comments on commit 9dc58c2

Please sign in to comment.