From 15fe925974130fe476b6c9323ae4a683a92656ad Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Fri, 22 May 2015 16:46:16 +0900 Subject: [PATCH] Copter: allow forcing disarm via mavlink using magic number Based on change by Jon Challinger but using new is_equal function --- ArduCopter/GCS_Mavlink.pde | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduCopter/GCS_Mavlink.pde b/ArduCopter/GCS_Mavlink.pde index 803415d189..1b76648223 100644 --- a/ArduCopter/GCS_Mavlink.pde +++ b/ArduCopter/GCS_Mavlink.pde @@ -1223,7 +1223,7 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) if (init_arm_motors(true)) { result = MAV_RESULT_ACCEPTED; } - } else if (is_zero(packet.param1) && (mode_has_manual_throttle(control_mode) || ap.land_complete)) { + } else if (is_zero(packet.param1) && (mode_has_manual_throttle(control_mode) || ap.land_complete || is_equal(packet.param2,21196.0f))) { init_disarm_motors(); result = MAV_RESULT_ACCEPTED; } else {