C2: CAN error message support

This commit is contained in:
David Rebbe
2026-04-17 11:39:38 -04:00
committed by Kyle Schwarz
parent f5f6d0828b
commit 9c4323987f
10 changed files with 416 additions and 40 deletions
+5
View File
@@ -119,7 +119,12 @@ std::shared_ptr<Message> HardwareCANPacket::DecodeToMessage(const std::vector<ui
}
msg->transmitted = data->eid.TXMSG;
// Set the generic frame error state
msg->error = data->eid.TXAborted || data->eid.TXError || data->eid.TXLostArb;
// Set specific error states for CANError
msg->txAborted = data->eid.TXAborted;
msg->txLostArb = data->eid.TXLostArb;
msg->txError = data->eid.TXError;
msg->description = data->stats;
return msg;