mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-08 02:57:16 +08:00
we had a deadlock between the mutex in HAL_ChibiOS CAN layer and the MAVLinkCAN object the deadlock arose because the low level CAN layer holds the HAL CAN mutex before it calls up to the MAVLinkCAN frame callback on the mavlink side, it took the MAVLinkCAN mutex before calling down to the CAN send layer, this meant it took the 2 mutexes in the opposite order the symptoms were: - failure to boot if we have active MAVCAN during reboot as we deadlock during the scheduler delay callback - deadlock during heavy MAVCAN usage
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