1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 16:25:26 +03:00

some extra speedups

This commit is contained in:
Pawel Spychalski (DzikuVx) 2019-02-02 22:33:12 +01:00
parent b7dddef483
commit ab2b05bab1
5 changed files with 8 additions and 8 deletions

View file

@ -200,7 +200,7 @@ void biquadFilterInit(biquadFilter_t *filter, uint16_t filterFreq, uint32_t samp
}
// Computes a biquad_t filter on a sample
float FAST_CODE NOINLINE biquadFilterApply(biquadFilter_t *filter, float input)
float FAST_CODE biquadFilterApply(biquadFilter_t *filter, float input)
{
const float result = filter->b0 * input + filter->d1;
filter->d1 = filter->b1 * input - filter->a1 * result + filter->d2;

View file

@ -67,7 +67,7 @@
stickPositions_e rcStickPositions;
int16_t rcCommand[4]; // interval [1000;2000] for THROTTLE and [-500;+500] for ROLL/PITCH/YAW
FASTRAM int16_t rcCommand[4]; // interval [1000;2000] for THROTTLE and [-500;+500] for ROLL/PITCH/YAW
PG_REGISTER_WITH_RESET_TEMPLATE(rcControlsConfig_t, rcControlsConfig, PG_RC_CONTROLS_CONFIG, 0);

View file

@ -58,8 +58,8 @@
static uint8_t motorCount;
int16_t motor[MAX_SUPPORTED_MOTORS];
int16_t motor_disarmed[MAX_SUPPORTED_MOTORS];
FASTRAM int16_t motor[MAX_SUPPORTED_MOTORS];
FASTRAM int16_t motor_disarmed[MAX_SUPPORTED_MOTORS];
static float motorMixRange;
PG_REGISTER_WITH_RESET_TEMPLATE(flight3DConfig_t, flight3DConfig, PG_MOTOR_3D_CONFIG, 0);

View file

@ -70,7 +70,7 @@ void updateBoardAlignment(int16_t roll, int16_t pitch)
initBoardAlignment();
}
void applyBoardAlignment(int32_t *vec)
void FAST_CODE applyBoardAlignment(int32_t *vec)
{
if (standardBoardAlignment) {
return;
@ -84,7 +84,7 @@ void applyBoardAlignment(int32_t *vec)
vec[Z] = lrintf(fpVec.z);
}
void applySensorAlignment(int32_t * dest, int32_t * src, uint8_t rotation)
void FAST_CODE applySensorAlignment(int32_t * dest, int32_t * src, uint8_t rotation)
{
// Create a copy so we could use the same buffer for src & dest
const int32_t x = src[X];

View file

@ -349,7 +349,7 @@ void gyroSetCalibrationCycles(uint16_t calibrationCyclesRequired)
gyroCalibration.calibratingG = calibrationCyclesRequired;
}
STATIC_UNIT_TESTED bool isCalibrationComplete(gyroCalibration_t *gyroCalibration)
STATIC_UNIT_TESTED bool FAST_CODE NOINLINE isCalibrationComplete(gyroCalibration_t *gyroCalibration)
{
return gyroCalibration->calibratingG == 0;
}
@ -414,7 +414,7 @@ void gyroGetMeasuredRotationRate(fpVector3_t *measuredRotationRate)
}
}
void gyroUpdate()
void FAST_CODE NOINLINE gyroUpdate()
{
// range: +/- 8192; +/- 2000 deg/sec
if (gyroDev0.readFn(&gyroDev0)) {