fix(mavlink): accept NAV_TAKEOFF param1 on multicopters (#27853)

Strict command-parameter validation added in #27541 rejects
MAV_CMD_NAV_TAKEOFF when an unsupported param is set. QGroundControl
sends param1 (minimum pitch) = -1 on multicopter takeoff, which is
non-zero/non-NaN, so commands were silently denied (MAV_RESULT_DENIED
with no log) on MC airframes and QGC guided takeoff stopped working.

Extend the NAV_TAKEOFF override to include VEHICLE_MC so param1 is
accepted and ignored on multicopters, matching FW/VTOL handling.
This commit is contained in:
Koi authored and GitHub committed 2026-07-14 15:08:38 +02:00
1 parent 7c70e4dbeb
commit 785ede83d4
1 file changed
+3 -2
@@ -197,8 +197,9 @@ struct VehicleOverride {
// When adding vehicle-specific param differences, add entries here.
static constexpr VehicleOverride VehicleParamOverrides[] = {
// NAV_TAKEOFF: p1 (minimum pitch angle) is used by FW and VTOL-FW; not applicable to MC.
{ 22, VEHICLE_FW | VEHICLE_VTOL, 0x01, 0x01 },
// NAV_TAKEOFF: p1 (minimum pitch angle) is used by FW and VTOL-FW; MC ignores it, but
// GCS (e.g. QGC) send p1=-1 on MC takeoff, so accept p1 for MC too instead of denying.
{ 22, VEHICLE_FW | VEHICLE_VTOL | VEHICLE_MC, 0x01, 0x01 },
};
// Binary search + vehicle override lookup. Returns the adjusted mask, or -1 if cmd not in table.