data/method/mavlink/examples/c
luozhikun cd7f3fd52a feat: mavlink 2024-07-24 18:30:46 +08:00
..
CMakeLists.txt feat: mavlink 2024-07-24 18:30:46 +08:00
README.md feat: mavlink 2024-07-24 18:30:46 +08:00
udp_example.c feat: mavlink 2024-07-24 18:30:46 +08:00

README.md

Simple C example

Simple example receiving and sending MAVLink v2 over UDP based on POSIX APIs (e.g. Linux, BSD, macOS).

In top level directory, build and install the MAVLink headers locally into the install folder:

cmake -Bbuild -H. -DCMAKE_INSTALL_PREFIX=install
cmake --build build --target install

Build example

In the example directory, build the example while passing the local install directory:

cd examples/c
cmake -Bbuild -H. -DCMAKE_PREFIX_PATH=$(pwd)/../../install
cmake --build build