When we use a gimbal connected via "RC", so PWM via the Aux channels, we
need to set the gimbal_device_id to 1 as per the protocol.
This was missing for GIMBAL_DEVICE_ATTITUDE_STATUS, so I added that, and
fixed the name of that variable while at it.
This fixes various edge cases when input is set to both: RC and
MAVLink gimbal protocol v2.
Specifically:
- We no longer immediately reset primary control if there is no update,
otherwise this will reset immediately after an commands.
- Talking of commands: GIMBAL_MANAGER_CONFIGURE no longer switches
control to MAVLink but only an actual incoming setpoint command does.
- And incoming setpoint command only triggers UpdatedActiveOnce which
means we will check RC again afterwards and if there is big movement
switch back to RC. That's the intuitive thing to do until we have
better reporting about who/what is in control.
- Also, with RC we no longer always set us to be in control but only on
major movement.
The API is cleaner if the control_data is const reference and the device
compid is an explicit output argument.
Signed-off-by: Julian Oes <julian@oes.ch>
It turns out that I had omitted implementing the gimbal_device_id which
is the component ID of the gimbal device that the gimbal manager (in
this case PX4) is responsible for.
Signed-off-by: Julian Oes <julian@oes.ch>