From 9c7c29b2a76a305592931d184464b18f53105e32 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 20 Sep 2022 17:37:48 +1000 Subject: [PATCH] GCS_MAVLink: add AP_GRIPPER_ENABLED --- libraries/GCS_MAVLink/GCS_Common.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index c8600255f9..0356d3ac72 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -4405,6 +4405,7 @@ MAV_RESULT GCS_MAVLINK::handle_command_set_ekf_source_set(const mavlink_command_ return MAV_RESULT_DENIED; } +#if AP_GRIPPER_ENABLED MAV_RESULT GCS_MAVLINK::handle_command_do_gripper(const mavlink_command_long_t &packet) { AP_Gripper *gripper = AP::gripper(); @@ -4434,6 +4435,7 @@ MAV_RESULT GCS_MAVLINK::handle_command_do_gripper(const mavlink_command_long_t & return result; } +#endif // AP_GRIPPER_ENABLED #if HAL_SPRAYER_ENABLED MAV_RESULT GCS_MAVLINK::handle_command_do_sprayer(const mavlink_command_long_t &packet) @@ -4583,10 +4585,11 @@ MAV_RESULT GCS_MAVLINK::handle_command_long_packet(const mavlink_command_long_t result = handle_command_camera(packet); break; #endif +#if AP_GRIPPER_ENABLED case MAV_CMD_DO_GRIPPER: result = handle_command_do_gripper(packet); break; - +#endif #if HAL_SPRAYER_ENABLED case MAV_CMD_DO_SPRAYER: result = handle_command_do_sprayer(packet);