From 43a56151d776dfbda4f9e53ba3030153daabd92b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 20 Dec 2013 12:04:23 +1100 Subject: [PATCH] Plane: reset mission on disarm this makes repeated missions easier --- ArduPlane/GCS_Mavlink.pde | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArduPlane/GCS_Mavlink.pde b/ArduPlane/GCS_Mavlink.pde index 3a273fd6ee..e41c437fef 100644 --- a/ArduPlane/GCS_Mavlink.pde +++ b/ArduPlane/GCS_Mavlink.pde @@ -1267,10 +1267,12 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) } } else if (packet.param1 == 0.0f) { if (arming.disarm()) { - //only log if disarming was successful if (arming.arming_required() != AP_Arming::YES_ZERO_PWM) { channel_throttle->disable_out(); } + // reset the mission on disarm + change_command(0); + //only log if disarming was successful Log_Arm_Disarm(); result = MAV_RESULT_ACCEPTED; } else {