From 5a533b77d16a563e13e3512ebeb290e4ec8a6a08 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 12 Nov 2026 11:49:55 +1100 Subject: [PATCH] fix(mavlink): accept DO_SET_ROI_WPNEXT_OFFSET pitch/roll/yaw offsets (#29758) The param validation table allowed only param1 for MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET, but params 5-7 carry the pitch, roll and yaw offsets that navigator copies into vehicle_roi and the gimbal applies. As a result, every QGroundControl Structure Scan upload was rejected (INVALID_PARAM5, or INVALID_PARAM7 with a zero gimbal pitch, because QGC sends a 90 degree yaw offset), and the command form was denied. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Hamish Willee --- src/modules/mavlink/mavlink_command_params.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/mavlink/mavlink_command_params.hpp b/src/modules/mavlink/mavlink_command_params.hpp index 0e541ac1884..b2ccd8e2a6e 100644 --- a/src/modules/mavlink/mavlink_command_params.hpp +++ b/src/modules/mavlink/mavlink_command_params.hpp @@ -99,7 +99,7 @@ static constexpr Entry SupportedCommandParams[] = { { 179, 0x7F, 0x7F }, // DO_SET_HOME: p1:use_current,p2:roll,p3:pitch,p4:yaw; p5-7:lat/lon/alt { 189, 0x70, 0x70 }, // DO_LAND_START: p5-7:lat/lon/alt (optional marker position per spec; QGC sets it) { 195, 0x70, 0x71 }, // DO_SET_ROI_LOCATION: mission:p5-7:lat/lon/alt; cmd:p1:gimbal,p5-7:lat/lon/alt - { 196, 0x01, 0x01 }, // DO_SET_ROI_WPNEXT_OFFSET: p1:gimbal_id + { 196, 0x71, 0x71 }, // DO_SET_ROI_WPNEXT_OFFSET: p1:gimbal_id; p5-7:pitch/roll/yaw offset { 197, 0x01, 0x01 }, // DO_SET_ROI_NONE: p1:gimbal_id { 201, 0x07, 0x07 }, // DO_SET_ROI: p1:mode,p2:wp_idx,p3:roi_idx { 206, 0x0F, 0x0F }, // DO_SET_CAM_TRIGG_DIST: p1:dist,p2:shutter,p3:trigger,p4:camera_id