From 4f7a80a04d55329d933b1aaf46111ae9bdd4b1f9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 4 Jun 2012 13:14:05 +1000 Subject: [PATCH] Mavlink: fixed library build for MAVLink 1.0 --- libraries/GCS_MAVLink/GCS_MAVLink.h | 6 +++--- libraries/GCS_MAVLink/Mavlink_compat.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/GCS_MAVLink/GCS_MAVLink.h b/libraries/GCS_MAVLink/GCS_MAVLink.h index 6e85053094..c256d4c05a 100644 --- a/libraries/GCS_MAVLink/GCS_MAVLink.h +++ b/libraries/GCS_MAVLink/GCS_MAVLink.h @@ -12,7 +12,7 @@ // to select MAVLink 1.0 in the arduino GUI build //#define MAVLINK_SEPARATE_HELPERS -#ifdef MAVLINK10 +#if MAVLINK10 == ENABLED # include "include/mavlink/v1.0/ardupilotmega/version.h" #else # include "include/mavlink/v0.9/ardupilotmega/version.h" @@ -22,7 +22,7 @@ #define MAVLINK_MAX_PAYLOAD_LEN MAVLINK_MAX_DIALECT_PAYLOAD_SIZE #define MAVLINK_COMM_NUM_BUFFERS 2 -#ifdef MAVLINK10 +#if MAVLINK10==ENABLED # include "include/mavlink/v1.0/mavlink_types.h" #else # include "include/mavlink/v0.9/mavlink_types.h" @@ -119,7 +119,7 @@ static inline int comm_get_txspace(mavlink_channel_t chan) } #define MAVLINK_USE_CONVENIENCE_FUNCTIONS -#ifdef MAVLINK10 +#if MAVLINK10==1 # include "include/mavlink/v1.0/ardupilotmega/mavlink.h" #else # include "include/mavlink/v0.9/ardupilotmega/mavlink.h" diff --git a/libraries/GCS_MAVLink/Mavlink_compat.h b/libraries/GCS_MAVLink/Mavlink_compat.h index c159da8d93..10826b6a3c 100644 --- a/libraries/GCS_MAVLink/Mavlink_compat.h +++ b/libraries/GCS_MAVLink/Mavlink_compat.h @@ -2,7 +2,7 @@ compatibility header during transition to MAVLink 1.0 */ -#ifdef MAVLINK10 +#if MAVLINK10==1 // in MAVLink 1.0 'waypoint' becomes 'mission'. We can remove these // mappings once we are not trying to support both protocols