Copter: move handling of MAV_CMD_DO_GRIPPER up

This commit is contained in:
Peter Barker 2018-06-08 16:22:43 +10:00 committed by Francisco Ferreira
parent 2cdcca2841
commit 955baa47c2
3 changed files with 0 additions and 25 deletions

View File

@ -1039,29 +1039,6 @@ void GCS_MAVLINK_Copter::handleMessage(mavlink_message_t* msg)
packet.param4, (uint8_t)packet.param5);
break;
#if GRIPPER_ENABLED == ENABLED
case MAV_CMD_DO_GRIPPER:
// param1 : gripper number (ignored)
// param2 : action (0=release, 1=grab). See GRIPPER_ACTIONS enum.
if(!copter.g2.gripper.enabled()) {
result = MAV_RESULT_FAILED;
} else {
result = MAV_RESULT_ACCEPTED;
switch ((uint8_t)packet.param2) {
case GRIPPER_ACTION_RELEASE:
copter.g2.gripper.release();
break;
case GRIPPER_ACTION_GRAB:
copter.g2.gripper.grab();
break;
default:
result = MAV_RESULT_FAILED;
break;
}
}
break;
#endif
#if WINCH_ENABLED == ENABLED
case MAV_CMD_DO_WINCH:
// param1 : winch number (ignored)

View File

@ -58,7 +58,6 @@ LIBRARIES += AC_InputManager
LIBRARIES += AP_ADSB
LIBRARIES += AP_Avoidance
LIBRARIES += AP_Stats
LIBRARIES += AP_Gripper
LIBRARIES += AP_Beacon
LIBRARIES += AP_Arming
LIBRARIES += AP_SmartRTL

View File

@ -28,7 +28,6 @@ def build(bld):
'AP_AdvancedFailsafe',
'AP_SmartRTL',
'AP_Stats',
'AP_Gripper',
'AP_Beacon',
'AP_Arming',
'AP_WheelEncoder',