mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Communication: Ignore empty LIN frames for checksum
This commit is contained in:
committed by
Kyle Schwarz
parent
538d6ec0c8
commit
e1a0ca056a
@@ -31,7 +31,7 @@ std::shared_ptr<Message> HardwareLINPacket::DecodeToMessage(const std::vector<ui
|
|||||||
auto isChecksumInvalid = [&]() -> bool {
|
auto isChecksumInvalid = [&]() -> bool {
|
||||||
/* messages with no data have no checksum (e.g. header only) */
|
/* messages with no data have no checksum (e.g. header only) */
|
||||||
if(!msg->data.size())
|
if(!msg->data.size())
|
||||||
return true;
|
return false;
|
||||||
|
|
||||||
uint8_t checkSum = (8 > numDataBytes) ? *(dataStart + numDataBytes) : packet->CoreMiniBitsLIN.LINByte9;
|
uint8_t checkSum = (8 > numDataBytes) ? *(dataStart + numDataBytes) : packet->CoreMiniBitsLIN.LINByte9;
|
||||||
LINMessage::calcChecksum(*msg);
|
LINMessage::calcChecksum(*msg);
|
||||||
|
|||||||
Reference in New Issue
Block a user