mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
commit
c9f49ada4c
1 changed files with 1 additions and 1 deletions
|
@ -910,11 +910,11 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, timeUs_t currentTim
|
|||
// This is done to avoid DTerm spikes that occur with dynamically
|
||||
// calculated deltaT whenever another task causes the PID
|
||||
// loop execution to be delayed.
|
||||
previousRawGyroRateDterm[axis] = gyroRateDterm[axis];
|
||||
|
||||
// Log the unfiltered D for ROLL and PITCH
|
||||
if (axis != FD_YAW) {
|
||||
const float delta = (previousRawGyroRateDterm[axis] - gyroRateDterm[axis]) * pidRuntime.pidFrequency / D_LPF_RAW_SCALE;
|
||||
previousRawGyroRateDterm[axis] = gyroRateDterm[axis];
|
||||
DEBUG_SET(DEBUG_D_LPF, axis, lrintf(delta));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue