mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
A malformed CAN_FILTER_MODIFY message with a bus value of zero produces bus == -1 after the off-by-one adjustment. The existing bounds check only tested the upper bound, so hal.can[-1] was dereferenced before validation. Add a lower-bound check, matching the fix applied to MAV_CMD_CAN_FORWARD. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Testing And Debugging
Testing under SITL
A wide range of DroneCAN peripherals are supported in the SITL simulation system. The simplest way of starting a DroneCAN enabled simulated vehicle is to use sim_vehicle.py.
For a quadplane use: sim_vehicle.py with the option -f quadplane-can
For a quadcopter use: sim_vehicle.py with the option -f quad-can