Skip to content

Commit

Permalink
ArduPlane: Plane: add test bits for AOA_SSA
Browse files Browse the repository at this point in the history
Some changes.
  • Loading branch information
colejmero authored and peterbarker committed Dec 11, 2024
1 parent cc162dc commit ce9f16e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions ArduPlane/ArduPlane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
5 changes: 5 additions & 0 deletions ArduPlane/Plane.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -100,6 +101,8 @@
#include "tuning.h"
#endif



// Configuration
#include "config.h"

Expand Down Expand Up @@ -239,6 +242,8 @@ class Plane : public AP_Vehicle {
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};

Expand Down
2 changes: 2 additions & 0 deletions ArduPlane/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions ArduPlane/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def build(bld):
'AP_LTM_Telem',
'AP_Devo_Telem',
'AC_AutoTune',
'AP_AngleSensor',
'AP_Follow',
'AC_PrecLand',
'AP_IRLock',
Expand Down

0 comments on commit ce9f16e

Please sign in to comment.