From ec0df918e50e43f34270abae68eee15ed711655f Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Fri, 1 Apr 2022 20:59:10 +0100 Subject: [PATCH] AP_InertialSensor: move frontend update into ramfunc. --- libraries/AP_InertialSensor/AP_InertialSensor.h | 4 ++-- libraries/AP_InertialSensor/AP_InertialSensor_Backend.h | 8 ++++---- .../AP_InertialSensor/AP_InertialSensor_Invensense.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.h b/libraries/AP_InertialSensor/AP_InertialSensor.h index e39d5d489e..81c7155931 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.h +++ b/libraries/AP_InertialSensor/AP_InertialSensor.h @@ -215,10 +215,10 @@ public: float get_gyro_drift_rate(void) const { return ToRad(0.5f/60); } // update gyro and accel values from accumulated samples - void update(void); + void update(void) __RAMFUNC__; // wait for a sample to be available - void wait_for_sample(void); + void wait_for_sample(void) __RAMFUNC__; // class level parameters static const struct AP_Param::GroupInfo var_info[]; diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_Backend.h b/libraries/AP_InertialSensor/AP_InertialSensor_Backend.h index 7c0f1d23c1..db5d226269 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_Backend.h +++ b/libraries/AP_InertialSensor/AP_InertialSensor_Backend.h @@ -137,7 +137,7 @@ protected: void _rotate_and_correct_gyro(uint8_t instance, Vector3f &gyro) __RAMFUNC__; // rotate gyro vector, offset and publish - void _publish_gyro(uint8_t instance, const Vector3f &gyro); /* front end */ + void _publish_gyro(uint8_t instance, const Vector3f &gyro) __RAMFUNC__; /* front end */ // this should be called every time a new gyro raw sample is // available - be it published or not the sample is raw in the @@ -151,7 +151,7 @@ protected: void _notify_new_delta_angle(uint8_t instance, const Vector3f &dangle); // rotate accel vector, scale, offset and publish - void _publish_accel(uint8_t instance, const Vector3f &accel); /* front end */ + void _publish_accel(uint8_t instance, const Vector3f &accel) __RAMFUNC__; /* front end */ // this should be called every time a new accel raw sample is available - // be it published or not @@ -286,10 +286,10 @@ protected: bool gyro_harmonic_notch_enabled(void) const { return _imu._harmonic_notch_filter.enabled(); } // common gyro update function for all backends - void update_gyro(uint8_t instance); /* front end */ + void update_gyro(uint8_t instance) __RAMFUNC__; /* front end */ // common accel update function for all backends - void update_accel(uint8_t instance); /* front end */ + void update_accel(uint8_t instance) __RAMFUNC__; /* front end */ // support for updating filter at runtime uint16_t _last_accel_filter_hz; diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_Invensense.h b/libraries/AP_InertialSensor/AP_InertialSensor_Invensense.h index 798dea82a1..3230a7f83d 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_Invensense.h +++ b/libraries/AP_InertialSensor/AP_InertialSensor_Invensense.h @@ -45,7 +45,7 @@ public: enum Rotation rotation); /* update accel and gyro state */ - bool update() override; /* front end */ + bool update() override __RAMFUNC__; /* front end */ void accumulate() override; /* front end */ /*