Skip to content

Commit

Permalink
Add correct LICH direction to match Icom repeaters.
Browse files Browse the repository at this point in the history
  • Loading branch information
g4klx committed May 23, 2018
1 parent 31beeee commit 2bb9cb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NXDNControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ bool CNXDNControl::processVoice(unsigned char usc, unsigned char option, unsigne
lich.setDirection(m_remoteGateway || !m_duplex ? NXDN_LICH_DIRECTION_INBOUND : NXDN_LICH_DIRECTION_OUTBOUND);
lich.encode(data + 2U);

lich.setDirection(NXDN_LICH_DIRECTION_INBOUND);
netData[0U] = lich.getRaw();

CNXDNSACCH sacch;
Expand Down Expand Up @@ -402,6 +403,7 @@ bool CNXDNControl::processVoice(unsigned char usc, unsigned char option, unsigne
lich.setDirection(m_remoteGateway || !m_duplex ? NXDN_LICH_DIRECTION_INBOUND : NXDN_LICH_DIRECTION_OUTBOUND);
lich.encode(start + 2U);

lich.setDirection(NXDN_LICH_DIRECTION_INBOUND);
netData[0U] = lich.getRaw();

CNXDNSACCH sacch;
Expand Down Expand Up @@ -446,6 +448,7 @@ bool CNXDNControl::processVoice(unsigned char usc, unsigned char option, unsigne
lich.setDirection(m_remoteGateway || !m_duplex ? NXDN_LICH_DIRECTION_INBOUND : NXDN_LICH_DIRECTION_OUTBOUND);
lich.encode(data + 2U);

lich.setDirection(NXDN_LICH_DIRECTION_INBOUND);
netData[0U] = lich.getRaw();

// Regenerate SACCH if it's valid
Expand Down Expand Up @@ -614,6 +617,7 @@ bool CNXDNControl::processData(unsigned char option, unsigned char *data)
lich.setDirection(m_remoteGateway || !m_duplex ? NXDN_LICH_DIRECTION_INBOUND : NXDN_LICH_DIRECTION_OUTBOUND);
lich.encode(data + 2U);

lich.setDirection(NXDN_LICH_DIRECTION_INBOUND);
netData[0U] = lich.getRaw();

udch.getRaw(netData + 1U);
Expand Down
2 changes: 1 addition & 1 deletion NXDNLayer3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bool CNXDNLayer3::getIsGroup() const

unsigned char CNXDNLayer3::getDataBlocks() const
{
return m_data[8U] & 0x0FU;
return (m_data[8U] & 0x0FU) + 1U;
}

void CNXDNLayer3::getData(unsigned char* data) const
Expand Down

0 comments on commit 2bb9cb9

Please sign in to comment.