From 2372a4f3b6fa99170adc066042b3cfb569313783 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 29 Jan 2022 22:19:14 +1100 Subject: [PATCH] ArduSub: provide default implemenation of handle_change_alt_request The TODO items to actually implement these are almost 6 years old. Since then these methods have been burning space. This doesn't even make sense for several vehicles, so a default implementation which does nothing seems OK. --- ArduSub/GCS_Mavlink.cpp | 10 ---------- ArduSub/GCS_Mavlink.h | 1 - 2 files changed, 11 deletions(-) diff --git a/ArduSub/GCS_Mavlink.cpp b/ArduSub/GCS_Mavlink.cpp index c74168b494..61d9a7bc28 100644 --- a/ArduSub/GCS_Mavlink.cpp +++ b/ArduSub/GCS_Mavlink.cpp @@ -407,16 +407,6 @@ bool GCS_MAVLINK_Sub::handle_guided_request(AP_Mission::Mission_Command &cmd) return sub.do_guided(cmd); } -void GCS_MAVLINK_Sub::handle_change_alt_request(AP_Mission::Mission_Command &cmd) -{ - // add home alt if needed - if (cmd.content.location.relative_alt) { - cmd.content.location.alt += sub.ahrs.get_home().alt; - } - - // To-Do: update target altitude for loiter or waypoint controller depending upon nav mode -} - MAV_RESULT GCS_MAVLINK_Sub::_handle_command_preflight_calibration_baro() { if (sub.motors.armed()) { diff --git a/ArduSub/GCS_Mavlink.h b/ArduSub/GCS_Mavlink.h index dedbcb9b16..1193e7611d 100644 --- a/ArduSub/GCS_Mavlink.h +++ b/ArduSub/GCS_Mavlink.h @@ -43,7 +43,6 @@ private: void handleMessage(const mavlink_message_t &msg) override; bool handle_guided_request(AP_Mission::Mission_Command &cmd) override; - void handle_change_alt_request(AP_Mission::Mission_Command &cmd) override; bool try_send_message(enum ap_message id) override; bool send_info(void);