From cf2a8821990be02eb92c850a9d2cd3d0d0e7de16 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 27 Oct 2022 14:14:57 +1100 Subject: [PATCH] use MAV_CMD_REQUEST_MESSAGE to get AUTOPILOT_VERSION --- ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs b/ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs index acd41ad5ff..1095512d55 100644 --- a/ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs +++ b/ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs @@ -5667,10 +5667,15 @@ public async Task getVersionAsync(byte sysid, byte compid, bool responcere req.target_component = compid; req.target_system = sysid; - // use both methods + // use *all three* methods + doCommand(MAVLink.MAV_CMD.REQUEST_MESSAGE, + (float)MAVLink.MAVLINK_MSG_ID.AUTOPILOT_VERSION, + 0, 0, 0, 0, 0, 0, false); + + // MAV_CMD.REQUEST_AUTOPILOT_CAPABILITIES is deprecated doCommand(MAV_CMD.REQUEST_AUTOPILOT_CAPABILITIES, 0, 0, 0, 0, 0, 0, 0, false); - // request point + // AUTOPILOT_VERSION_REQUEST is deprecated generatePacket((byte) MAVLINK_MSG_ID.AUTOPILOT_VERSION_REQUEST, req); if (!responcerequired)