Rename the CRC4 functions correctly.

This commit is contained in:
Jonathan Naylor
2021-03-26 22:45:33 +00:00
parent 0a94b0deb6
commit 8efd77132f
3 changed files with 11 additions and 11 deletions

View File

@@ -217,7 +217,7 @@ bool CM17Control::writeModem(unsigned char* data, unsigned int len)
unsigned char lich[M17_LICH_FRAGMENT_LENGTH_BYTES];
CM17Utils::combineFragmentLICH(lich1, lich2, lich3, lich4, lich);
if (!CM17CRC::checkCRC8(lich, M17_LICH_FRAGMENT_LENGTH_BYTES))
if (!CM17CRC::checkCRC4(lich, M17_LICH_FRAGMENT_LENGTH_BYTES))
return false;
m_rfLSFn = (lich4 >> 5) & 0x07U;
@@ -301,7 +301,7 @@ bool CM17Control::writeModem(unsigned char* data, unsigned int len)
lich[5U] = (m_rfLSFn & 0x07U) << 5;
// Add the CRC
CM17CRC::encodeCRC8(lich, M17_LICH_FRAGMENT_LENGTH_BYTES);
CM17CRC::encodeCRC4(lich, M17_LICH_FRAGMENT_LENGTH_BYTES);
unsigned int frag1, frag2, frag3, frag4;
CM17Utils::splitFragmentLICH(lich, frag1, frag2, frag3, frag4);
@@ -523,7 +523,7 @@ void CM17Control::writeNetwork()
lich[5U] = (m_netLSFn & 0x07U) << 5;
// Add the CRC
CM17CRC::encodeCRC8(lich, M17_LICH_FRAGMENT_LENGTH_BYTES);
CM17CRC::encodeCRC4(lich, M17_LICH_FRAGMENT_LENGTH_BYTES);
unsigned int frag1, frag2, frag3, frag4;
CM17Utils::splitFragmentLICH(lich, frag1, frag2, frag3, frag4);