Skip to content

Commit acd0463

Browse files
rusefillcdron0gus
andauthored
CAN RX: filter out not ours packets by WB_BL_HEADER (mck1117#343)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
1 parent 1f77d82 commit acd0463

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

firmware/can.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ void CanRxThread(void*)
8181
continue;
8282
}
8383

84+
// Ignore not ours frames
85+
if (WB_MSG_GET_HEADER(CAN_ID(frame)) != WB_BL_HEADER)
86+
{
87+
continue;
88+
}
89+
8490
if (frame.DLC >= 2 && CAN_ID(frame) == WB_MSG_ECU_STATUS)
8591
{
8692
// This is status from ECU

0 commit comments

Comments
 (0)