Communication: Ignore empty LIN frames for checksum
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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue