Copter: do pre-arm checks when arming from GCS

This commit is contained in:
Randy Mackay 2013-05-17 11:22:32 +09:00
parent 4c9cb461d6
commit 28c37dd798

View File

@ -1215,7 +1215,9 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
case MAV_CMD_COMPONENT_ARM_DISARM:
if (packet.target_component == MAV_COMP_ID_SYSTEM_CONTROL) {
if (packet.param1 == 1.0f) {
init_arm_motors();
if(ap.pre_arm_check) {
init_arm_motors();
}
result = MAV_RESULT_ACCEPTED;
} else if (packet.param1 == 0.0f) {
init_disarm_motors();