From f15c84bdacf1a298f1e947aa07509fa2c4250e9d Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Fri, 5 Nov 2021 16:13:03 +0000 Subject: [PATCH] AP_Vehicle: add custom rotations lib --- libraries/AP_Vehicle/AP_Vehicle.cpp | 6 ++++++ libraries/AP_Vehicle/AP_Vehicle.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/libraries/AP_Vehicle/AP_Vehicle.cpp b/libraries/AP_Vehicle/AP_Vehicle.cpp index 338081b6c9..d0b37269b9 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.cpp +++ b/libraries/AP_Vehicle/AP_Vehicle.cpp @@ -73,6 +73,10 @@ const AP_Param::GroupInfo AP_Vehicle::var_info[] = { AP_SUBGROUPINFO(airspeed, "ARSPD", 10, AP_Vehicle, AP_Airspeed), #endif + // @Group: CUST_ROT + // @Path: ../AP_CustomRotations/AP_CustomRotations.cpp + AP_SUBGROUPINFO(custom_rotations, "CUST_ROT", 11, AP_Vehicle, AP_CustomRotations), + AP_GROUPEND }; @@ -204,6 +208,8 @@ void AP_Vehicle::setup() efi.init(); #endif + custom_rotations.init(); + gcs().send_text(MAV_SEVERITY_INFO, "ArduPilot Ready"); } diff --git a/libraries/AP_Vehicle/AP_Vehicle.h b/libraries/AP_Vehicle/AP_Vehicle.h index 2d0b0bf786..4df022eb8b 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.h +++ b/libraries/AP_Vehicle/AP_Vehicle.h @@ -51,6 +51,7 @@ #if CONFIG_HAL_BOARD == HAL_BOARD_SITL #include #endif +#include class AP_Vehicle : public AP_HAL::HAL::Callbacks { @@ -413,6 +414,8 @@ private: bool done_safety_init; uint32_t _last_internal_errors; // backup of AP_InternalError::internal_errors bitmask + + AP_CustomRotations custom_rotations; }; namespace AP {