From 74edf9cb1eac9a5c2f7d58eae8732107327a5559 Mon Sep 17 00:00:00 2001 From: squilter Date: Fri, 21 Aug 2015 10:37:13 -0700 Subject: [PATCH] Plane: define and send FIRMWARE_VERSION --- ArduPlane/GCS_Mavlink.cpp | 5 ++--- ArduPlane/Plane.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ArduPlane/GCS_Mavlink.cpp b/ArduPlane/GCS_Mavlink.cpp index 3a5da5e799..04ad2507ea 100644 --- a/ArduPlane/GCS_Mavlink.cpp +++ b/ArduPlane/GCS_Mavlink.cpp @@ -1342,7 +1342,7 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) case MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES: { if (is_equal(packet.param1,1.0f)) { - plane.gcs[chan-MAVLINK_COMM_0].send_autopilot_version(); + plane.gcs[chan-MAVLINK_COMM_0].send_autopilot_version(FIRMWARE_VERSION); result = MAV_RESULT_ACCEPTED; } break; @@ -1743,7 +1743,7 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) break; case MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST: - plane.gcs[chan-MAVLINK_COMM_0].send_autopilot_version(); + plane.gcs[chan-MAVLINK_COMM_0].send_autopilot_version(FIRMWARE_VERSION); break; } // end switch @@ -1895,4 +1895,3 @@ void Plane::gcs_retry_deferred(void) { gcs_send_message(MSG_RETRY_DEFERRED); } - diff --git a/ArduPlane/Plane.h b/ArduPlane/Plane.h index df8d6cd762..a3a1ef9d8d 100644 --- a/ArduPlane/Plane.h +++ b/ArduPlane/Plane.h @@ -1,6 +1,8 @@ /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- #define THISFIRMWARE "ArduPlane V3.4.0beta1" +#define FIRMWARE_VERSION 3,4,0,FIRMWARE_VERSION_TYPE_BETA + /* Lead developer: Andrew Tridgell