Mavlink_common

Website:

https://mavlink.io

Authors:
  • Fil Andrii
  • Max Reznik
Maintainers:
  • Fil Andrii <root.fi36@gmail.com>
  • Max Reznik <reznikmm@gmail.com>
License:

MIT

Version:

3.0.0

Alire CI:

Dependencies: Dependents: Badge:

MAVLink -- Micro Air Vehicle Message Marshalling Library.

#embedded #network #drone

MAVLink – Common Dialect (Ada Bindings)

This crate provides an Ada binding for the MAVLink common dialect: the shared, vendor-neutral set of messages, enums and commands that most other MAVLink dialects (ArduPilot, PX4, …) build on top of.

The code is generated, not hand-written. It comes straight from the official MAVLink XML message definitions via pymavlink’s mavgen tool with its Ada backend, then lightly post-processed. This keeps the binding faithful to the upstream specification and makes it straightforward to refresh whenever common.xml changes.

What you get

  • Strongly typed Ada records for every common message, with fields, arrays, enums and bitmasks represented as proper Ada types instead of raw bytes.
  • Marshalling/unmarshalling subprograms for each message, plus the frame header and CRC handling needed to talk MAVLink on the wire.
  • pragma Pure, bareboard-friendly packages, suitable for embedded targets (e.g. STM32) as well as desktop ground control software.

Wire protocol version

This crate targets the MAVLink 1.0 wire protocol. If you need the MAVLink 2.0 wire format (extended message IDs, message signing, extension fields), use the sibling crate mavlink_common_v2 instead – it exposes the same common dialect messages, packed differently on the wire.

  • mavlink_shared – code shared by all the generated dialect crates (CRC, low-level float/byte helpers, etc.). Pulled in automatically as a dependency; you normally don’t need to depend on it directly.
  • mavlink_ardupilotmega – the ArduPilot-specific ardupilotmega dialect, which extends common with vendor messages. Depend on it instead of on this crate if you’re talking to ArduPilot/PX4 vehicles and need their custom messages in addition to the standard ones.
  • mavlink_common_v2 – same dialect, MAVLink 2.0 wire protocol.