Michael Schaeuble 19bca47b9e Preserve gimbal control when receiving updates from an input that is not active
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.
2022-11-22 12:08:47 +01:00
..