Candle.NET icon indicating copy to clipboard operation
Candle.NET copied to clipboard

Incorrect behaviour for RTR and DLC

Open betgear opened this issue 1 year ago • 0 comments

This library is broken when sending an RTR request with a DLC length and no data. This is allowed in the CAN protocol.

I've tested candlelight firmware in linux and these messages work correctly.

You do not store the dlc (length of the can message) as a separate variable within the CAN frame, and instead rely on the length of the data byte[] for length calculations, as no data is being sent with the RTR the length for the message is not sent.

Additionally, the length on bus function does not take into account STD message data lengths.

Cheers Glen.

betgear avatar Jun 22 '24 19:06 betgear