-
Notifications
You must be signed in to change notification settings - Fork 666
Enable CanFD support in "serial" interface#1566
Enable CanFD support in "serial" interface #1566jacky309 wants to merge 1 commit intohardbyte:main from
Conversation
@jacky309
jacky309
commented
Apr 13, 2023
- Remove (DLC <= 8) limitation
* Remove (DLC <= 8) limitation
jacky309
commented
May 9, 2023
Any feedback regarding this pull-request ?
lumagi
commented
May 26, 2023
Hey @jacky309,
your PR does not take into consideration the fact that a regular CAN frame shouldn't have a payload larger than 8 Byte. If you want to send CAN-FD frames over the interface, I recommend adding proper CAN-FD support to the interface.
This would entail the following points:
- Adding a flag field to the transmission frame
- sending up to 8 byte if frame.is_fd == False, sending and receiving up to 64 byte if frame.is_fd is True
jacky309
commented
May 31, 2023
Do you mean that the serial frame format described at https://python-can.readthedocs.io/en/master/interfaces/serial.html should be changed to introduce a new field to identify if a frame is CanFD or not ? This would be a breaking change which is likely to cause some trouble with existing software, right ? IMO, this is not acceptable.
This PR, as it is now, introduces the improvement that CanFD frames can be transmitted over a serial connection, without requiring any change to the serial frame format. IMO, this benefit outweights the fact that the length check is gone, so I would consider merging this PR for now.