AP_Vehicle: add AC_Fence

This commit is contained in:
Iampete1 2022-03-04 16:41:48 +00:00 committed by Andrew Tridgell
parent eac067a5c4
commit 9e86f4dc43
2 changed files with 18 additions and 0 deletions

View File

@ -93,6 +93,12 @@ const AP_Param::GroupInfo AP_Vehicle::var_info[] = {
AP_SUBGROUPINFO(ais, "AIS_", 13, AP_Vehicle, AP_AIS),
#endif
#if AC_FENCE
// @Group: FENCE_
// @Path: ../AC_Fence/AC_Fence.cpp
AP_SUBGROUPINFO(fence, "FENCE_", 14, AP_Vehicle, AC_Fence),
#endif
AP_GROUPEND
};
@ -232,6 +238,10 @@ void AP_Vehicle::setup()
ais.init();
#endif
#if AC_FENCE
fence.init();
#endif
custom_rotations.init();
gcs().send_text(MAV_SEVERITY_INFO, "ArduPilot Ready");
@ -325,6 +335,9 @@ const AP_Scheduler::Task AP_Vehicle::scheduler_tasks[] = {
#if HAL_INS_ACCELCAL_ENABLED
SCHED_TASK(accel_cal_update, 10, 100, 245),
#endif
#if AC_FENCE
SCHED_TASK_CLASS(AC_Fence, &vehicle.fence, update, 10, 100, 248),
#endif
#if AP_AIS_ENABLED
SCHED_TASK_CLASS(AP_AIS, &vehicle.ais, update, 5, 100, 249),
#endif

View File

@ -53,6 +53,7 @@
#include <SITL/SITL.h>
#include <AP_CustomRotations/AP_CustomRotations.h>
#include <AP_AIS/AP_AIS.h>
#include <AC_Fence/AC_Fence.h>
class AP_Vehicle : public AP_HAL::HAL::Callbacks {
@ -397,6 +398,10 @@ protected:
AP_AIS ais;
#endif
#if AC_FENCE
AC_Fence fence;
#endif
static const struct AP_Param::GroupInfo var_info[];
static const struct AP_Scheduler::Task scheduler_tasks[];