From fa1a6d3beb005e170e1368f66b76c632c99957e7 Mon Sep 17 00:00:00 2001 From: "tridge60@gmail.com" Date: Sun, 4 Sep 2011 08:51:51 +0000 Subject: [PATCH] shrink the size of mavlink_message_t using max dialect message size this makes mavlink_message_t much smaller, but setting MAVLINK_MAX_PAYLOAD_LEN to the maximum message size in this dialect. This saves us 320 bytes of memory git-svn-id: https://arducopter.googlecode.com/svn/trunk@3239 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- libraries/GCS_MAVLink/GCS_MAVLink.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/GCS_MAVLink/GCS_MAVLink.h b/libraries/GCS_MAVLink/GCS_MAVLink.h index d94c8853a6..37d7beb37a 100644 --- a/libraries/GCS_MAVLink/GCS_MAVLink.h +++ b/libraries/GCS_MAVLink/GCS_MAVLink.h @@ -8,6 +8,11 @@ #include +#include "include/ardupilotmega/version.h" + +// this allows us to make mavlink_message_t much smaller +#define MAVLINK_MAX_PAYLOAD_LEN MAVLINK_MAX_DIALECT_PAYLOAD_SIZE + #define MAVLINK_COMM_NUM_BUFFERS 2 #include "include/mavlink_types.h"