501.
Both are built so a surface that disconnects mid-move never leaves the payload moving: the agent stops the motion itself when the surface stops renewing it.
Gimbal rate
Is a gimbal there?
available needs a connected MAVLink flight controller and a gimbal attitude from it in the last 1.5 seconds. Otherwise reason says why: flight controller not connected, this flight controller speaks MSP, or no gimbal reported by the flight controller. A surface shows its pad only when available is true.
Move it
MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW to the flight controller’s gimbal manager with no angle target and the two rates.
A surface resends while the pad is held. If no new request arrives within
hold_ms, the agent sends a zero rate. Each request replaces the one before it. accepted is always null: the gimbal manager’s acceptance is not observed on this path.
MAVLink camera
A camera that speaks the MAVLink camera protocol (a camera component on the vehicle, or the autopilot’s own camera backend) describes itself withCAMERA_INFORMATION. A surface lists the cameras first and drives Photo and Zoom through one when it is advertised; without one it falls back to a local frame grab and digital zoom.
List cameras
CAMERA_INFORMATION from every component of the flight controller’s system and collects the answers for a short window. A camera that answered in the last minute stays listed, so one lost reply does not make it disappear. No flight controller, an MSP flight controller or no answer gives an empty list, never an error.
Take a photo
MAV_CMD_IMAGE_START_CAPTURE for one image.
Zoom
MAV_CMD_SET_CAMERA_ZOOM. type is one of the two zoom types ArduPilot’s camera library accepts:
A zoom button sends a rate on press and 0 on release. A non-zero continuous rate holds only while the caller keeps it alive: unless another zoom or a keepalive (the same body with
"keepalive": true) arrives within about a second, the agent sends rate 0 itself. A keepalive sends nothing to the camera, and is 409 when no zoom of that component is moving.
Answers
Both writes answer200 once the command was written: {"ok", "result", "component_id"}. result is the camera’s MAV_RESULT name (ACCEPTED, TEMPORARILY_REJECTED, DENIED, UNSUPPORTED, FAILED, IN_PROGRESS, CANCELLED), or TIMEOUT when no acknowledgement arrived. ok is true for ACCEPTED and IN_PROGRESS. A status text the vehicle sent beside a refusal is attached.