mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
The update function of InputMavlinkGimbalV2 returns UpdatedNotActive when receiving control commands from a system or component that doesn't match the primary control. This can happen if a component just sends commands without being in control or when transitioning to a different primary control. If the input is marked as already_active, it will reset last_input_active which in turn resets the primary control in the next iteration. According to the MAVLink gimbal protocol v2, a component needs to send MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE to start controlling the gimbal and to remove control. However, with the current implementation there are several other commands that would reset the primary control. With this PR, the primary control remains with the component that requested it last if updates from a not active component are received.