From 15abc784ec8ae20edf1d86c8b8ef1326d480a9e0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 3 Dec 2012 23:28:23 +1100 Subject: [PATCH] MAVLink: use a smaller maximum payload to reduce memory this limits the sizes of the MAVLink buffers. It doesn't make a big difference now, but it will matter when we update to the latest mavlink code which has some very large packets --- libraries/GCS_MAVLink/GCS_MAVLink.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/GCS_MAVLink/GCS_MAVLink.h b/libraries/GCS_MAVLink/GCS_MAVLink.h index ec98706c15..bd2198994f 100644 --- a/libraries/GCS_MAVLink/GCS_MAVLink.h +++ b/libraries/GCS_MAVLink/GCS_MAVLink.h @@ -14,8 +14,10 @@ #include "include/mavlink/v1.0/ardupilotmega/version.h" -// this allows us to make mavlink_message_t much smaller -#define MAVLINK_MAX_PAYLOAD_LEN MAVLINK_MAX_DIALECT_PAYLOAD_SIZE +// this allows us to make mavlink_message_t much smaller. It means we +// can't support the largest messages in common.xml, but we don't need +// those for APM +#define MAVLINK_MAX_PAYLOAD_LEN 96 #define MAVLINK_COMM_NUM_BUFFERS 2 #include "include/mavlink/v1.0/mavlink_types.h"