commaai / panda

code powering the comma.ai panda
MIT License
1.52k stars 766 forks source link

returned address for forwarded messages different on H7 vs F4 #1816

Closed sshane closed 6 months ago

sshane commented 8 months ago

Close if we don't want to spend any time on this

Was confusing for Nick who was doing a car port, who's used to the three method of storing the returned bus. We should just pick one and stick with it.

bxcan stores the destination bus (CAN buffer number - 128 means delivered on bus 0): https://github.com/commaai/panda/blob/c118c2887d0b9029957b63069e8d8e57b8c530b4/board/drivers/bxcan.h#L136-L141

fdcan stores the source bus (CANPacket_t bus - 128 means origin is bus 0): https://github.com/commaai/panda/blob/c118c2887d0b9029957b63069e8d8e57b8c530b4/board/drivers/fdcan.h#L130-L134

adeebshihadeh commented 8 months ago

Let's fix this