From 081694f557bf0b35020223f68915f4d5ec0ae369 Mon Sep 17 00:00:00 2001 From: squilter Date: Fri, 21 Aug 2015 10:36:30 -0700 Subject: [PATCH] Rover: define and send FIRMWARE_VERSION --- APMrover2/GCS_Mavlink.cpp | 4 ++-- APMrover2/Rover.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/APMrover2/GCS_Mavlink.cpp b/APMrover2/GCS_Mavlink.cpp index 8b0e21d1d8..e5e165460d 100644 --- a/APMrover2/GCS_Mavlink.cpp +++ b/APMrover2/GCS_Mavlink.cpp @@ -1026,7 +1026,7 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) case MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES: { if (is_equal(packet.param1,1.0f)) { - rover.gcs[chan-MAVLINK_COMM_0].send_autopilot_version(); + rover.gcs[chan-MAVLINK_COMM_0].send_autopilot_version(FIRMWARE_VERSION); result = MAV_RESULT_ACCEPTED; } break; @@ -1268,7 +1268,7 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) #endif case MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST: - rover.gcs[chan-MAVLINK_COMM_0].send_autopilot_version(); + rover.gcs[chan-MAVLINK_COMM_0].send_autopilot_version(FIRMWARE_VERSION); break; } // end switch diff --git a/APMrover2/Rover.h b/APMrover2/Rover.h index d0a2e5fb7c..ff94c2c011 100644 --- a/APMrover2/Rover.h +++ b/APMrover2/Rover.h @@ -21,6 +21,7 @@ #define _ROVER_H_ #define THISFIRMWARE "ArduRover v2.51-beta" +#define FIRMWARE_VERSION 2,51,0,FIRMWARE_VERSION_TYPE_BETA #include #include