The API for parsePacket is defined as returning 0 when there is no packet in the input buffer, and returning DLC when there is a packet to read in the input buffer. Therefore packets with DLC=0 will appear the same as when no packets have arrived.
As a consequence of this confusion, the callback onReceive will not be executed when a packet with DLC=0 arrives on the CAN-bus.
Packets with DLC=0 (no data payload bytes) are perfectly valid packets on a CAN-bus. They should be able to be sent to and received from the bus using this library.
The API for parsePacket is defined as returning 0 when there is no packet in the input buffer, and returning DLC when there is a packet to read in the input buffer. Therefore packets with DLC=0 will appear the same as when no packets have arrived.
As a consequence of this confusion, the callback
onReceivewill not be executed when a packet with DLC=0 arrives on the CAN-bus.Packets with DLC=0 (no data payload bytes) are perfectly valid packets on a CAN-bus. They should be able to be sent to and received from the bus using this library.