From 98f9e744b06927a729faba32dc28a880e7837fa4 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 19 Aug 2017 19:53:15 +1000 Subject: [PATCH] Tracker: move send_autopilot_request calls up to GCS base class --- AntennaTracker/GCS_Mavlink.cpp | 17 +++++------------ AntennaTracker/GCS_Mavlink.h | 1 + 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/AntennaTracker/GCS_Mavlink.cpp b/AntennaTracker/GCS_Mavlink.cpp index d2e095028f..352c5c3a8a 100644 --- a/AntennaTracker/GCS_Mavlink.cpp +++ b/AntennaTracker/GCS_Mavlink.cpp @@ -582,14 +582,6 @@ void GCS_MAVLINK_Tracker::handleMessage(mavlink_message_t* msg) break; } - case MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES: { - if (is_equal(packet.param1,1.0f)) { - send_autopilot_version(FIRMWARE_VERSION); - result = MAV_RESULT_ACCEPTED; - } - break; - } - case MAV_CMD_ACCELCAL_VEHICLE_POS: result = MAV_RESULT_FAILED; @@ -740,10 +732,6 @@ mission_failed: break; } - case MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST: - send_autopilot_version(FIRMWARE_VERSION); - break; - default: handle_common_message(msg); break; @@ -838,6 +826,11 @@ bool GCS_MAVLINK_Tracker::set_mode(uint8_t mode) return false; } +const AP_FWVersion &GCS_MAVLINK_Tracker::get_fwver() const +{ + return tracker.fwver; +} + /* dummy methods to avoid having to link against AP_Camera */ void AP_Camera::control_msg(mavlink_message_t const*) {} void AP_Camera::configure(float, float, float, float, float, float, float) {} diff --git a/AntennaTracker/GCS_Mavlink.h b/AntennaTracker/GCS_Mavlink.h index ee3a867585..d8fa9364dc 100644 --- a/AntennaTracker/GCS_Mavlink.h +++ b/AntennaTracker/GCS_Mavlink.h @@ -22,6 +22,7 @@ protected: AP_Camera *get_camera() const override { return nullptr; }; AP_ServoRelayEvents *get_servorelayevents() const override { return nullptr; } AP_GPS *get_gps() const override; + const AP_FWVersion &get_fwver() const override; uint8_t sysid_my_gcs() const override;