diff --git a/libraries/GCS_MAVLink/include/mavlink/v0.9/ardupilotmega/ardupilotmega.h b/libraries/GCS_MAVLink/include/mavlink/v0.9/ardupilotmega/ardupilotmega.h
index 4148b5a6a954f29ebaf3cdb77b406bea41364c21..311858ffd8324d6702af7cda835a4ce9b9a16fef 100644
--- a/libraries/GCS_MAVLink/include/mavlink/v0.9/ardupilotmega/ardupilotmega.h
+++ b/libraries/GCS_MAVLink/include/mavlink/v0.9/ardupilotmega/ardupilotmega.h
@@ -27,19 +27,6 @@ extern "C" {
 
 #define MAVLINK_ENABLED_ARDUPILOTMEGA
 
-#include "../common/common.h"
-
-// MAVLINK VERSION
-
-#ifndef MAVLINK_VERSION
-#define MAVLINK_VERSION 2
-#endif
-
-#if (MAVLINK_VERSION == 0)
-#undef MAVLINK_VERSION
-#define MAVLINK_VERSION 2
-#endif
-
 // ENUM DEFINITIONS
 
 
@@ -130,6 +117,19 @@ enum FENCE_BREACH
 };
 #endif
 
+#include "../common/common.h"
+
+// MAVLINK VERSION
+
+#ifndef MAVLINK_VERSION
+#define MAVLINK_VERSION 2
+#endif
+
+#if (MAVLINK_VERSION == 0)
+#undef MAVLINK_VERSION
+#define MAVLINK_VERSION 2
+#endif
+
 // MESSAGE DEFINITIONS
 #include "./mavlink_msg_sensor_offsets.h"
 #include "./mavlink_msg_set_mag_offsets.h"
diff --git a/libraries/GCS_MAVLink/include/mavlink/v0.9/ardupilotmega/version.h b/libraries/GCS_MAVLink/include/mavlink/v0.9/ardupilotmega/version.h
index 319b4dbed0176e8bdadb6939bac3f0d1d48ab594..336dbe14e7a92267ef97d9b509839b4cb029f140 100644
--- a/libraries/GCS_MAVLink/include/mavlink/v0.9/ardupilotmega/version.h
+++ b/libraries/GCS_MAVLink/include/mavlink/v0.9/ardupilotmega/version.h
@@ -5,7 +5,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Tue Apr 24 10:29:51 2012"
+#define MAVLINK_BUILD_DATE "Mon Apr 30 11:40:11 2012"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "0.9"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 101
  
diff --git a/libraries/GCS_MAVLink/include/mavlink/v0.9/common/common.h b/libraries/GCS_MAVLink/include/mavlink/v0.9/common/common.h
index 210baad49ba866814d76e179799b3f1b43a89927..471202f482fde64a770055ace4f38485bdc28529 100644
--- a/libraries/GCS_MAVLink/include/mavlink/v0.9/common/common.h
+++ b/libraries/GCS_MAVLink/include/mavlink/v0.9/common/common.h
@@ -27,19 +27,6 @@ extern "C" {
 
 #define MAVLINK_ENABLED_COMMON
 
-
-
-// MAVLINK VERSION
-
-#ifndef MAVLINK_VERSION
-#define MAVLINK_VERSION 2
-#endif
-
-#if (MAVLINK_VERSION == 0)
-#undef MAVLINK_VERSION
-#define MAVLINK_VERSION 2
-#endif
-
 // ENUM DEFINITIONS
 
 
@@ -81,6 +68,19 @@ enum MAV_ROI
 };
 #endif
 
+
+
+// MAVLINK VERSION
+
+#ifndef MAVLINK_VERSION
+#define MAVLINK_VERSION 2
+#endif
+
+#if (MAVLINK_VERSION == 0)
+#undef MAVLINK_VERSION
+#define MAVLINK_VERSION 2
+#endif
+
 // MESSAGE DEFINITIONS
 #include "./mavlink_msg_heartbeat.h"
 #include "./mavlink_msg_boot.h"
diff --git a/libraries/GCS_MAVLink/include/mavlink/v0.9/common/version.h b/libraries/GCS_MAVLink/include/mavlink/v0.9/common/version.h
index 872c25a677f7a7e95ee4e1af784ad3677b464e2c..9e6e7dbe43c4c1c8afa8595fa38885c2992c9095 100644
--- a/libraries/GCS_MAVLink/include/mavlink/v0.9/common/version.h
+++ b/libraries/GCS_MAVLink/include/mavlink/v0.9/common/version.h
@@ -5,7 +5,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Tue Apr 24 10:29:51 2012"
+#define MAVLINK_BUILD_DATE "Mon Apr 30 11:40:11 2012"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "0.9"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 101
  
diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/ardupilotmega.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/ardupilotmega.h
index a77a453855058f77883c6e2ee31088e8e8cae8a7..7157bba7d335fddadb4233e3202e2f5d9c9f3e98 100644
--- a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/ardupilotmega.h
+++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/ardupilotmega.h
@@ -27,19 +27,6 @@ extern "C" {
 
 #define MAVLINK_ENABLED_ARDUPILOTMEGA
 
-#include "../common/common.h"
-
-// MAVLINK VERSION
-
-#ifndef MAVLINK_VERSION
-#define MAVLINK_VERSION 2
-#endif
-
-#if (MAVLINK_VERSION == 0)
-#undef MAVLINK_VERSION
-#define MAVLINK_VERSION 2
-#endif
-
 // ENUM DEFINITIONS
 
 
@@ -127,6 +114,19 @@ enum FENCE_BREACH
 };
 #endif
 
+#include "../common/common.h"
+
+// MAVLINK VERSION
+
+#ifndef MAVLINK_VERSION
+#define MAVLINK_VERSION 2
+#endif
+
+#if (MAVLINK_VERSION == 0)
+#undef MAVLINK_VERSION
+#define MAVLINK_VERSION 2
+#endif
+
 // MESSAGE DEFINITIONS
 #include "./mavlink_msg_sensor_offsets.h"
 #include "./mavlink_msg_set_mag_offsets.h"
diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/version.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/version.h
index 2f6014644e392a533c7db1fdc144a0532f23b1a9..bee5bec18b57433d5238f7984c231f8fcb8a5e7c 100644
--- a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/version.h
+++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/version.h
@@ -5,7 +5,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Tue Apr 24 10:29:51 2012"
+#define MAVLINK_BUILD_DATE "Mon Apr 30 11:40:12 2012"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 101
  
diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/common/common.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/common/common.h
index d9851110d346644a59fd64087f5e85683fcb985f..910e148ae1805d85c664a6b73f31d1b3832d1fb0 100644
--- a/libraries/GCS_MAVLink/include/mavlink/v1.0/common/common.h
+++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/common/common.h
@@ -27,19 +27,6 @@ extern "C" {
 
 #define MAVLINK_ENABLED_COMMON
 
-
-
-// MAVLINK VERSION
-
-#ifndef MAVLINK_VERSION
-#define MAVLINK_VERSION 3
-#endif
-
-#if (MAVLINK_VERSION == 0)
-#undef MAVLINK_VERSION
-#define MAVLINK_VERSION 3
-#endif
-
 // ENUM DEFINITIONS
 
 
@@ -364,6 +351,19 @@ enum MAV_SEVERITY
 };
 #endif
 
+
+
+// MAVLINK VERSION
+
+#ifndef MAVLINK_VERSION
+#define MAVLINK_VERSION 3
+#endif
+
+#if (MAVLINK_VERSION == 0)
+#undef MAVLINK_VERSION
+#define MAVLINK_VERSION 3
+#endif
+
 // MESSAGE DEFINITIONS
 #include "./mavlink_msg_heartbeat.h"
 #include "./mavlink_msg_sys_status.h"
diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/common/version.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/common/version.h
index 3cd0335edd3b799fc528ac95b04268f8060d17b1..c888d75e3a4c7baeb9741510a5ab815ad18e877e 100644
--- a/libraries/GCS_MAVLink/include/mavlink/v1.0/common/version.h
+++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/common/version.h
@@ -5,7 +5,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Tue Apr 24 10:29:51 2012"
+#define MAVLINK_BUILD_DATE "Mon Apr 30 11:40:12 2012"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 101