Communication: Ignore empty LIN frames for checksum

pull/64/merge
Jonathan Schwartz 2025-03-21 18:04:45 +00:00 committed by Kyle Schwarz
parent 538d6ec0c8
commit e1a0ca056a
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ std::shared_ptr<Message> HardwareLINPacket::DecodeToMessage(const std::vector<ui
auto isChecksumInvalid = [&]() -> bool {
/* messages with no data have no checksum (e.g. header only) */
if(!msg->data.size())
return true;
return false;
uint8_t checkSum = (8 > numDataBytes) ? *(dataStart + numDataBytes) : packet->CoreMiniBitsLIN.LINByte9;
LINMessage::calcChecksum(*msg);