AP_Vehicle: add custom rotations lib

This commit is contained in:
Iampete1 2021-11-05 16:13:03 +00:00 committed by Andrew Tridgell
parent 7a6f57ccf1
commit f15c84bdac
2 changed files with 9 additions and 0 deletions

View File

@ -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");
}

View File

@ -51,6 +51,7 @@
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <SITL/SITL.h>
#endif
#include <AP_CustomRotations/AP_CustomRotations.h>
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 {