We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf70f51 commit 63ca46bCopy full SHA for 63ca46b
board/drivers/can.h
@@ -415,6 +415,9 @@ void can_rx(uint8_t can_number) {
415
to_push.RDLR = CAN->sFIFOMailBox[0].RDLR;
416
to_push.RDHR = CAN->sFIFOMailBox[0].RDHR;
417
418
+ // modify RDTR for our API
419
+ to_push.RDTR = (to_push.RDTR & 0xFFFF000F) | (bus_number << 4);
420
+
421
// forwarding (panda only)
422
#ifdef PANDA
423
int bus_fwd_num = can_forwarding[bus_number] != -1 ? can_forwarding[bus_number] : safety_fwd_hook(bus_number, &to_push);
@@ -428,8 +431,6 @@ void can_rx(uint8_t can_number) {
428
431
}
429
432
#endif
430
433
- // modify RDTR for our API
- to_push.RDTR = (to_push.RDTR & 0xFFFF000F) | (bus_number << 4);
434
safety_rx_hook(&to_push);
435
436
0 commit comments