From 3f6dd706d1a53dd82428c20e2a633b0b248d4f46 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 27 Feb 2019 11:16:56 +1100 Subject: [PATCH] Tracker: accept arm/disarm to any component ID, not just MAV_COMP_ID_SYSTEM_CONTROL --- AntennaTracker/GCS_Mavlink.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/AntennaTracker/GCS_Mavlink.cpp b/AntennaTracker/GCS_Mavlink.cpp index b56242554c..7d174b3b4d 100644 --- a/AntennaTracker/GCS_Mavlink.cpp +++ b/AntennaTracker/GCS_Mavlink.cpp @@ -343,16 +343,13 @@ MAV_RESULT GCS_MAVLINK_Tracker::handle_command_long_packet(const mavlink_command switch(packet.command) { case MAV_CMD_COMPONENT_ARM_DISARM: - if (packet.target_component == MAV_COMP_ID_SYSTEM_CONTROL) { - if (is_equal(packet.param1,1.0f)) { - tracker.arm_servos(); - return MAV_RESULT_ACCEPTED; - } else if (is_zero(packet.param1)) { - tracker.disarm_servos(); - return MAV_RESULT_ACCEPTED; - } else { - return MAV_RESULT_UNSUPPORTED; - } + if (is_equal(packet.param1,1.0f)) { + tracker.arm_servos(); + return MAV_RESULT_ACCEPTED; + } + if (is_zero(packet.param1)) { + tracker.disarm_servos(); + return MAV_RESULT_ACCEPTED; } return MAV_RESULT_UNSUPPORTED;