From fe43ae538fcb04fb967d0a1bddcd352158e01a33 Mon Sep 17 00:00:00 2001 From: Michael Day Date: Fri, 17 Oct 2014 10:35:05 -0700 Subject: [PATCH] Plane: Added support for MAV_CMD_DO_LAND_START --- ArduPlane/GCS_Mavlink.pde | 13 +++++++++++++ ArduPlane/commands_logic.pde | 1 + 2 files changed, 14 insertions(+) diff --git a/ArduPlane/GCS_Mavlink.pde b/ArduPlane/GCS_Mavlink.pde index 8a7ffe2175..05d70b5817 100644 --- a/ArduPlane/GCS_Mavlink.pde +++ b/ArduPlane/GCS_Mavlink.pde @@ -1109,6 +1109,19 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) } break; + case MAV_CMD_DO_LAND_START: + result = MAV_RESULT_FAILED; + //no reason to AUTO land in MANUAL mode. + if (control_mode == MANUAL) { + break; + } + + //attempt to switch to next DO_LAND_START command in the mission + if (mission.jump_to_landing_sequence()) { + result = MAV_RESULT_ACCEPTED; + } + break; + case MAV_CMD_DO_FENCE_ENABLE: result = MAV_RESULT_ACCEPTED; diff --git a/ArduPlane/commands_logic.pde b/ArduPlane/commands_logic.pde index bcc946edb1..c06be0aaea 100644 --- a/ArduPlane/commands_logic.pde +++ b/ArduPlane/commands_logic.pde @@ -233,6 +233,7 @@ static bool verify_command(const AP_Mission::Mission_Command& cmd) // Ret case MAV_CMD_DO_MOUNT_CONFIGURE: case MAV_CMD_DO_MOUNT_CONTROL: case MAV_CMD_DO_INVERTED_FLIGHT: + case MAV_CMD_DO_LAND_START: return true; default: