ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
11.08k stars 17.65k forks source link

AP_Arming: add check that CAN_P1_DRIVER and CAN_P2_DRIVER are not the same #23241

Closed rmackay9 closed 5 days ago

rmackay9 commented 1 year ago

We had a support issue on the forums where the user was unable to get a DroneCAN rangefinder to work and after some back-and-forth the issue was caused by the user setting both CAN_P1_DRIVER and CAN_P2_DRIVER to "1". We should add an arming check to ensure these two parameters are never both 1 or both 2.

As a side note, I think the abstraction allowing users to setup CAN_P1_DRIVER to anything but 0 or 1 is an unnecessary complexity. Why would it be better to have CAN_P1 as the 2nd CAN driver? We should have just had CAN1_xxx and CAN2_xxx.

peterbarker commented 6 days ago

Re-using the same driver on both ports conserves resources.

rmackay9 commented 5 days ago

Yes, we can close this now