Adding dupport for sending and receiving CAN RTR messages.#1186
Adding dupport for sending and receiving CAN RTR messages.#1186HenrikSolver wants to merge 1 commit intomicropython:masterfrom
Conversation
|
I also thought about making normal send take an rtr parameter... but in that case the |
|
I have changed my mind about this several times for the same reason. But I think this way is reasonable, it saves some flash and the maintenance might be a bit easier since the code in both functions are very similar. |
|
Merged in e3cd154. A think making send handle RTR frames is the right thing to do. An RTR frame is exactly the same as a normal data frame, except for the single RTR bit, so it should use the same method. In fact, the standard allows you to put a non-zero value in the DLC entry of an RTR frame (even though the data payload does not exist) so that makes the data parameter relevant. |
UART enhancements
The rebase of the PR #1098 became a bit messy since that branch has been laying around for some time. So I have made this new fresh branch and moved relevant parts from the old one. I also merged the code for sending RTRs into the normal send method. It saved one hundred something bytes