1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 19:40:31 +03:00

remove non-required parameters, simplify calling FF recalculation

This commit is contained in:
ctzsnooze 2021-03-22 18:24:56 +11:00
parent 9cb2fdbf47
commit 34096c50f0
3 changed files with 12 additions and 27 deletions

View file

@ -803,9 +803,6 @@ static FAST_CODE_NOINLINE float applyLaunchControl(int axis, const rollAndPitchT
void FAST_CODE pidController(const pidProfile_t *pidProfile, timeUs_t currentTimeUs)
{
static float previousGyroRateDterm[XYZ_AXIS_COUNT];
#ifdef USE_INTERPOLATED_SP
static FAST_DATA_ZERO_INIT uint32_t lastFrameNumber;
#endif
static float previousRawGyroRateDterm[XYZ_AXIS_COUNT];
#if defined(USE_ACC)
@ -919,8 +916,7 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, timeUs_t currentTim
#ifdef USE_INTERPOLATED_SP
bool newRcFrame = false;
if (lastFrameNumber != getRcFrameNumber()) {
lastFrameNumber = getRcFrameNumber();
if (getShouldUpdateFf()) {
newRcFrame = true;
}
#endif