Recalculate the CRC when getting the raw LICH data.
This commit is contained in:
parent
5b45767fea
commit
528c0f33f3
1 changed files with 11 additions and 1 deletions
12
NXDNLICH.cpp
12
NXDNLICH.cpp
|
@ -109,6 +109,16 @@ unsigned char CNXDNLICH::getDirection() const
|
|||
|
||||
unsigned char CNXDNLICH::getRaw() const
|
||||
{
|
||||
switch (m_lich[0U] & 0xF0U) {
|
||||
case 0x80U:
|
||||
case 0xB0U:
|
||||
m_lich[0U] |= 0x01U;
|
||||
break;
|
||||
default:
|
||||
m_lich[0U] &= 0xFEU;
|
||||
break;
|
||||
}
|
||||
|
||||
return m_lich[0U];
|
||||
}
|
||||
|
||||
|
@ -127,7 +137,7 @@ void CNXDNLICH::setFCT(unsigned char usc)
|
|||
void CNXDNLICH::setOption(unsigned char option)
|
||||
{
|
||||
m_lich[0U] &= 0xF3U;
|
||||
m_lich[0u] |= (option << 2) & 0x0CU;
|
||||
m_lich[0U] |= (option << 2) & 0x0CU;
|
||||
}
|
||||
|
||||
void CNXDNLICH::setDirection(unsigned char direction)
|
||||
|
|
Loading…
Reference in a new issue