MAVLink micro air vehicle marshalling / communication library
Python C JavaScript CMake C++ HTML Other
Clone or download
Pull request Compare This branch is 76 commits ahead, 1727 commits behind mavlink:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cmake
doc
examples/linux
message_definitions
missionlib
modules
pymavlink
simulator
.gitignore
CMakeLists.txt
COPYING
README.md
config.h.in
gen_smaccmpilot_pymavlink.sh
mavproxy.py
pc.in
requirements.txt
run-mavproxy.sh
runsim.sh

README.md

NOTE: This repository is no longer in use by the SMACCMPilot project! Kept for archival purposes only

MAVLink

MAVLink -- Micro Air Vehicle Message Marshalling Library.

This is a library for lightweight communication between Micro Air Vehicles (swarm) and/or ground control stations. It serializes C-structs for serial channels and can be used with any type of radio modem.

Messages definitions are created in XML, and then converted into C header files.

Generating Headers

Header files can be generated either with mavgen, or within QGroundControl.

With mavgen

mavgen is a header generation tool written in python, which is included with MAVLink. It can be used directly or via the generator.py GUI. To use the GUI, run:

python generate.py

If you would rather use mavgen from the command line see pymavlink\generator\mavgen.py.

With QGroundControl

To generate/update packets, select mavlink_standard_message.xml in the QGroundControl station settings view, select mavlink/include as the output directory and click on "Save and Generate". You will find the newly generated/updated message_xx.h files in the mavlink/include/generated folder.

Usage

To use MAVLink, include the mavlink.h header file in your project:

#include <mavlink.h>

Do not include the individual message files. In some cases you will have to add the main folder to the include search path as well. To be safe, we recommend these flags:

gcc -I mavlink/include -I mavlink/include/<your message set, e.g. common>

License

MAVLink is licensed under the terms of the Lesser General Public License of the Free Software Foundation (LGPL). As MAVLink is a header-only library, compiling an application with it is considered "using the libary", not a derived work. MAVLink can therefore be used without limits in any closed-source application without publishing the source code of the closed-source application.

See the COPYING file for more info.

Credits

© 2009-2012 Lorenz Meier