MavlinkDialect Plugin¶
MavlinkDialect is a minimal plugin that brings its own MAVLink dialect. It receives and sends EXAMPLE_PING, a message AMC is not built with, and also listens to a compiled message and sends a command. It uses the upperflyview hook and nothing else.
Requires AMC 2.6.0+
See MAVLink Dialects and the MAVLink API.
What it does¶
- Declares
mavlink/example.xmlinplugin.json. The XML definesEXAMPLE_PING(id 60050) and includescommon.xml, which AMC provides. - Counts the autopilot's
HEARTBEATs, at most one per second. - Shows the last
EXAMPLE_PINGthe vehicle sent. - Send ping sends an
EXAMPLE_PINGto the vehicle. - Send command sends
MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIESto the autopilot and shows the result.
File structure¶
MavlinkDialect/
├── plugin.json
├── build.sh ← zips mavlink/ too
├── mavlink/
│ └── example.xml ← the dialect
├── src/
│ └── MavlinkDialectUpperFlyView.qml ← upperflyview hook
└── tools/
└── example_ping.py ← plays the vehicle side, not part of the plugin
plugin.json¶
{
"name": "MavlinkDialect",
"apiVersion": "2.0",
"description": "Example of a plugin bringing its own MAVLink dialect: receives and sends a message AMC does not compile in",
"author": "Auterion",
"copyright": "(c) 2026 Auterion AG",
"license": "MIT",
"type": "qml",
"mavlinkDialect": "mavlink/example.xml"
}
Trying it¶
- Build the plugin with
./build.shand importMavlinkDialect.pluginin Settings → Plugins. - Start a vehicle (e.g. PX4 SITL) so AMC connects to it on UDP 14550.
- Run
tools/example_ping.py. It sendsEXAMPLE_PINGas system 1, component 25, and prints everyEXAMPLE_PINGAMC sends back. Without a vehicle, runtools/example_ping.py --heartbeatto also pose as a generic autopilot that acks the command. - In the Fly view the panel shows the pings counting up. Send ping makes the script print
"hello from AMC", and Send command shows#1 ACCEPTED, numbered so each press shows.
The script needs only Python 3's standard library. It does not decode MAVLink generally: it knows the four messages it uses.