ArduPlane: Plane: add test bits for AOA_SSA

Some changes.
This commit is contained in:
colejmero 2023-05-18 10:17:17 +10:00 committed by Peter Barker
parent cc162dc0e5
commit ce9f16ef74
4 changed files with 9 additions and 0 deletions

View File

@ -70,6 +70,7 @@ const AP_Scheduler::Task Plane::scheduler_tasks[] = {
SCHED_TASK(update_compass, 10, 200, 39),
SCHED_TASK(calc_airspeed_errors, 10, 100, 42),
SCHED_TASK(update_alt, 10, 200, 45),
SCHED_TASK_CLASS(AP_AngleSensor_AS5600, &plane.aoa_sensor, update, 10, 200, 46),
SCHED_TASK(adjust_altitude_target, 10, 200, 48),
#if AP_ADVANCEDFAILSAFE_ENABLED
SCHED_TASK(afs_fs_check, 10, 100, 51),

View File

@ -74,6 +74,7 @@
#include <AP_OSD/AP_OSD.h>
#include <AP_Rally/AP_Rally.h>
#include <AP_AngleSensor/AS5600.h> //Magnetic Encoder library, line added by Cole
#include <AP_OpticalFlow/AP_OpticalFlow.h> // Optical Flow library
#include <AP_Parachute/AP_Parachute.h>
@ -100,6 +101,8 @@
#include "tuning.h"
#endif
// Configuration
#include "config.h"
@ -239,6 +242,8 @@ private:
AP_RPM rpm_sensor;
#endif
AP_AngleSensor_AS5600 aoa_sensor{2, 0x36}; //This is code added by Cole
AP_TECS TECS_controller{ahrs, aparm, landing, MASK_LOG_TECS};
AP_L1_Control L1_controller{ahrs, &TECS_controller};

View File

@ -175,6 +175,8 @@ void Plane::init_ardupilot()
g2.ice_control.init();
#endif
//Code added by Cole, initialize AS5600 sensor
aoa_sensor.init();
}
#if AP_FENCE_ENABLED

View File

@ -24,6 +24,7 @@ def build(bld):
'AP_LTM_Telem',
'AP_Devo_Telem',
'AC_AutoTune',
'AP_AngleSensor',
'AP_Follow',
'AC_PrecLand',
'AP_IRLock',