diff --git a/ArduPlane/ArduPlane.cpp b/ArduPlane/ArduPlane.cpp index d2c6f70e6c..7c05550acb 100644 --- a/ArduPlane/ArduPlane.cpp +++ b/ArduPlane/ArduPlane.cpp @@ -127,7 +127,7 @@ const AP_Scheduler::Task Plane::scheduler_tasks[] = { #if STATS_ENABLED == ENABLED SCHED_TASK_CLASS(AP_Stats, &plane.g2.stats, update, 1, 100, 153), #endif -#if GRIPPER_ENABLED == ENABLED +#if AP_GRIPPER_ENABLED SCHED_TASK_CLASS(AP_Gripper, &plane.g2.gripper, update, 10, 75, 156), #endif #if LANDING_GEAR_ENABLED == ENABLED diff --git a/ArduPlane/Parameters.cpp b/ArduPlane/Parameters.cpp index 9bf0838f6f..7f8bcc3f5e 100644 --- a/ArduPlane/Parameters.cpp +++ b/ArduPlane/Parameters.cpp @@ -1070,7 +1070,7 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = { // @User: Advanced AP_GROUPINFO("HOME_RESET_ALT", 11, ParametersG2, home_reset_threshold, 0), -#if GRIPPER_ENABLED == ENABLED +#if AP_GRIPPER_ENABLED // @Group: GRIP_ // @Path: ../libraries/AP_Gripper/AP_Gripper.cpp AP_SUBGROUPINFO(gripper, "GRIP_", 12, ParametersG2, AP_Gripper), diff --git a/ArduPlane/Parameters.h b/ArduPlane/Parameters.h index ab94503a9d..81f2c1faed 100644 --- a/ArduPlane/Parameters.h +++ b/ArduPlane/Parameters.h @@ -1,6 +1,7 @@ #pragma once #include +#include // Global parameter class. // @@ -513,7 +514,7 @@ public: // home reset altitude threshold AP_Int8 home_reset_threshold; -#if GRIPPER_ENABLED == ENABLED +#if AP_GRIPPER_ENABLED // Payload Gripper AP_Gripper gripper; #endif diff --git a/ArduPlane/Plane.h b/ArduPlane/Plane.h index 03597cc758..9588c2bda3 100644 --- a/ArduPlane/Plane.h +++ b/ArduPlane/Plane.h @@ -80,7 +80,6 @@ #include #include #include -#include #include #include // Landing Gear library #include diff --git a/ArduPlane/config.h b/ArduPlane/config.h index 1cb57afba4..1530e40c06 100644 --- a/ArduPlane/config.h +++ b/ArduPlane/config.h @@ -238,12 +238,6 @@ #define PARACHUTE HAL_PARACHUTE_ENABLED #endif -////////////////////////////////////////////////////////////////////////////// -// Payload Gripper -#ifndef GRIPPER_ENABLED - #define GRIPPER_ENABLED !HAL_MINIMIZE_FEATURES -#endif - #ifndef STATS_ENABLED # define STATS_ENABLED ENABLED #endif diff --git a/ArduPlane/system.cpp b/ArduPlane/system.cpp index a87b7c08ac..aaed743186 100644 --- a/ArduPlane/system.cpp +++ b/ArduPlane/system.cpp @@ -146,7 +146,7 @@ void Plane::init_ardupilot() #endif // init cargo gripper -#if GRIPPER_ENABLED == ENABLED +#if AP_GRIPPER_ENABLED g2.gripper.init(); #endif }