From e40fe2293b507a68d682d64edd2da85daae238f0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 18 Sep 2011 11:03:27 +1000 Subject: [PATCH] MAVLink: enable separate MAVLink helpers this makes the core MAVLink functions into library calls, instead of being inlined. The resulting code size doesn't change, but it means we can safely call MAVLink functions from multiple places without causing undue code bloat --- libraries/GCS_MAVLink/GCS_MAVLink.cpp | 2 ++ libraries/GCS_MAVLink/GCS_MAVLink.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libraries/GCS_MAVLink/GCS_MAVLink.cpp b/libraries/GCS_MAVLink/GCS_MAVLink.cpp index 2cecade369..0ecc270f5a 100644 --- a/libraries/GCS_MAVLink/GCS_MAVLink.cpp +++ b/libraries/GCS_MAVLink/GCS_MAVLink.cpp @@ -10,3 +10,5 @@ BetterStream *mavlink_comm_1_port; // this might need to move to the flight software mavlink_system_t mavlink_system = {7,1,0,0}; + +#include "include/mavlink_helpers.h" diff --git a/libraries/GCS_MAVLink/GCS_MAVLink.h b/libraries/GCS_MAVLink/GCS_MAVLink.h index d89f3ee34d..5de542bc4a 100644 --- a/libraries/GCS_MAVLink/GCS_MAVLink.h +++ b/libraries/GCS_MAVLink/GCS_MAVLink.h @@ -8,6 +8,8 @@ #include +#define MAVLINK_SEPARATE_HELPERS + #include "include/ardupilotmega/version.h" // this allows us to make mavlink_message_t much smaller