I'm a little confused! Regarding our structure the length of the data in a header should not be more than 3 (without CRC). Or you are getting CRC as part of the data and then take it out maybe? I can't find the section CRC took out.
MsgId : 2bytes
A5
MsgId
Len
Data
CRC
..padding..
And please make these values defined in one place(class) and use variables instead of the values. . .
This code is for test to be able to enable or disable CanInterface , MessageDispatcher console out to be able to debug without rebuild even on target. And I mentioned at top of the code that it's a Test code for debuging
I probably had that as "==" at one point and had to flip it later. When "==" I always put the constant first so that if I accidentally use "=" the compiler will flag it for me. I addressed this in my branch of code.