From fef4134702c71e1e8def4d8b9a9b239682bcd650 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 24 Apr 2012 22:17:20 +1000 Subject: [PATCH] MAVLink: removed the cpp part of the library this was preventing building MAVLink 1.0 with the arduino GUI as we can't set cpp defines --- libraries/GCS_MAVLink/GCS_MAVLink.cpp | 27 --------------------------- libraries/GCS_MAVLink/GCS_MAVLink.h | 4 +++- 2 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 libraries/GCS_MAVLink/GCS_MAVLink.cpp diff --git a/libraries/GCS_MAVLink/GCS_MAVLink.cpp b/libraries/GCS_MAVLink/GCS_MAVLink.cpp deleted file mode 100644 index fa8759f1e7..0000000000 --- a/libraries/GCS_MAVLink/GCS_MAVLink.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*- - -/// @file GCS_MAVLink.cpp -/// @brief Supporting bits for MAVLink. - -#include "GCS_MAVLink.h" - -BetterStream *mavlink_comm_0_port; -BetterStream *mavlink_comm_1_port; - -// this might need to move to the flight software -mavlink_system_t mavlink_system = {7,1,0,0}; - -#ifdef MAVLINK10 -# include "include/mavlink/v1.0/mavlink_helpers.h" -#else -# include "include/mavlink/v0.9/mavlink_helpers.h" -#endif - -uint8_t mavlink_check_target(uint8_t sysid, uint8_t compid) -{ - if (sysid != mavlink_system.sysid) - return 1; - // Currently we are not checking for correct compid since APM is not passing mavlink info to any subsystem - // If it is addressed to our system ID we assume it is for us - return 0; // no error -} diff --git a/libraries/GCS_MAVLink/GCS_MAVLink.h b/libraries/GCS_MAVLink/GCS_MAVLink.h index d2003b84fa..6e85053094 100644 --- a/libraries/GCS_MAVLink/GCS_MAVLink.h +++ b/libraries/GCS_MAVLink/GCS_MAVLink.h @@ -8,7 +8,9 @@ #include -#define MAVLINK_SEPARATE_HELPERS +// we have separate helpers disabled to make it possible +// to select MAVLink 1.0 in the arduino GUI build +//#define MAVLINK_SEPARATE_HELPERS #ifdef MAVLINK10 # include "include/mavlink/v1.0/ardupilotmega/version.h"