Skip to content

Commit

Permalink
use MAV_CMD_REQUEST_MESSAGE to get AUTOPILOT_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and meee1 committed Oct 31, 2022
1 parent dff2cd2 commit cf2a882
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5667,10 +5667,15 @@ public async Task<bool> 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)
Expand Down

0 comments on commit cf2a882

Please sign in to comment.