mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
Copter: move handling of MAV_CMD_DO_GRIPPER up
This commit is contained in:
parent
2cdcca2841
commit
955baa47c2
@ -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)
|
||||
|
@ -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
|
||||
|
@ -28,7 +28,6 @@ def build(bld):
|
||||
'AP_AdvancedFailsafe',
|
||||
'AP_SmartRTL',
|
||||
'AP_Stats',
|
||||
'AP_Gripper',
|
||||
'AP_Beacon',
|
||||
'AP_Arming',
|
||||
'AP_WheelEncoder',
|
||||
|
Loading…
Reference in New Issue
Block a user