ArduPlane: add AP_GRIPPER_ENABLED

This commit is contained in:
Peter Barker 2022-09-20 17:37:48 +10:00 committed by Andrew Tridgell
parent be93d8212c
commit 9e0894c93a
6 changed files with 5 additions and 11 deletions

View File

@ -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

View File

@ -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),

View File

@ -1,6 +1,7 @@
#pragma once
#include <AP_Common/AP_Common.h>
#include <AP_Gripper/AP_Gripper.h>
// 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

View File

@ -80,7 +80,6 @@
#include <AP_Parachute/AP_Parachute.h>
#include <AP_ADSB/AP_ADSB.h>
#include <AP_ICEngine/AP_ICEngine.h>
#include <AP_Gripper/AP_Gripper.h>
#include <AP_Landing/AP_Landing.h>
#include <AP_LandingGear/AP_LandingGear.h> // Landing Gear library
#include <AP_Follow/AP_Follow.h>

View File

@ -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

View File

@ -146,7 +146,7 @@ void Plane::init_ardupilot()
#endif
// init cargo gripper
#if GRIPPER_ENABLED == ENABLED
#if AP_GRIPPER_ENABLED
g2.gripper.init();
#endif
}