Skip to content

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.xml in plugin.json. The XML defines EXAMPLE_PING (id 60050) and includes common.xml, which AMC provides.
  • Counts the autopilot's HEARTBEATs, at most one per second.
  • Shows the last EXAMPLE_PING the vehicle sent.
  • Send ping sends an EXAMPLE_PING to the vehicle.
  • Send command sends MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES to 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

  1. Build the plugin with ./build.sh and import MavlinkDialect.plugin in Settings → Plugins.
  2. Start a vehicle (e.g. PX4 SITL) so AMC connects to it on UDP 14550.
  3. Run tools/example_ping.py. It sends EXAMPLE_PING as system 1, component 25, and prints every EXAMPLE_PING AMC sends back. Without a vehicle, run tools/example_ping.py --heartbeat to also pose as a generic autopilot that acks the command.
  4. 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.