diff --git a/ArduSub/ArduSub.cpp b/ArduSub/ArduSub.cpp index fcffc61e7b..380a473610 100644 --- a/ArduSub/ArduSub.cpp +++ b/ArduSub/ArduSub.cpp @@ -99,7 +99,7 @@ const AP_Scheduler::Task Sub::scheduler_tasks[] = { SCHED_TASK_CLASS(AP_RPM, &sub.rpm_sensor, update, 10, 200, 66), #endif SCHED_TASK(terrain_update, 10, 100, 72), -#if GRIPPER_ENABLED == ENABLED +#if AP_GRIPPER_ENABLED SCHED_TASK_CLASS(AP_Gripper, &sub.g2.gripper, update, 10, 75, 75), #endif #ifdef USERHOOK_FASTLOOP diff --git a/ArduSub/Parameters.cpp b/ArduSub/Parameters.cpp index bdea7800aa..4377db4be3 100644 --- a/ArduSub/Parameters.cpp +++ b/ArduSub/Parameters.cpp @@ -631,7 +631,7 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = { AP_SUBGROUPINFO(proximity, "PRX", 2, ParametersG2, AP_Proximity), #endif -#if GRIPPER_ENABLED == ENABLED +#if AP_GRIPPER_ENABLED // @Group: GRIP_ // @Path: ../libraries/AP_Gripper/AP_Gripper.cpp AP_SUBGROUPINFO(gripper, "GRIP_", 3, ParametersG2, AP_Gripper), diff --git a/ArduSub/Parameters.h b/ArduSub/Parameters.h index ff2cba528f..90bc0d0108 100644 --- a/ArduSub/Parameters.h +++ b/ArduSub/Parameters.h @@ -320,7 +320,7 @@ public: // var_info for holding Parameter information static const struct AP_Param::GroupInfo var_info[]; -#if GRIPPER_ENABLED +#if AP_GRIPPER_ENABLED AP_Gripper gripper; #endif diff --git a/ArduSub/Sub.h b/ArduSub/Sub.h index af49987d1e..e2fed1afee 100644 --- a/ArduSub/Sub.h +++ b/ArduSub/Sub.h @@ -87,7 +87,8 @@ #include #endif -#if GRIPPER_ENABLED == ENABLED +#include +#if AP_GRIPPER_ENABLED #include // gripper stuff #endif diff --git a/ArduSub/config.h b/ArduSub/config.h index c97107c5b3..d09d7e351c 100644 --- a/ArduSub/config.h +++ b/ArduSub/config.h @@ -91,12 +91,6 @@ # define EKF_ORIGIN_MAX_DIST_M 50000 // EKF origin and waypoints (including home) must be within 50km #endif -////////////////////////////////////////////////////////////////////////////// -// gripper -#ifndef GRIPPER_ENABLED -# define GRIPPER_ENABLED DISABLED -#endif - ////////////////////////////////////////////////////////////////////////////// // Nav-Guided - allows external nav computer to control vehicle #ifndef NAV_GUIDED diff --git a/ArduSub/system.cpp b/ArduSub/system.cpp index 6fa584378e..7743b1179a 100644 --- a/ArduSub/system.cpp +++ b/ArduSub/system.cpp @@ -20,7 +20,7 @@ void Sub::init_ardupilot() #endif // init cargo gripper -#if GRIPPER_ENABLED == ENABLED +#if AP_GRIPPER_ENABLED g2.gripper.init(); #endif