1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 13:25:30 +03:00

debug log only roll and pitch, but separately

This commit is contained in:
Thorsten Laux 2018-05-27 09:33:20 +02:00
parent 5a1d84cdae
commit 2c02c14a1d

View file

@ -631,8 +631,11 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, const rollAndPitchT
if (itermRelax) {
const float gyroTargetLow = pt1FilterApply(&windupLpf[axis][0], currentPidSetpoint);
const float gyroTargetHigh = pt1FilterApply(&windupLpf[axis][1], currentPidSetpoint);
DEBUG_SET(DEBUG_ITERM_RELAX, 0, gyroTargetHigh);
DEBUG_SET(DEBUG_ITERM_RELAX, 1, gyroTargetLow);
if (axis < FD_YAW) {
int itemOffset = (axis << 1);
DEBUG_SET(DEBUG_ITERM_RELAX, itemOffset++, gyroTargetHigh);
DEBUG_SET(DEBUG_ITERM_RELAX, itemOffset, gyroTargetLow);
}
const float gmax = MAX(gyroTargetHigh, gyroTargetLow);
const float gmin = MIN(gyroTargetHigh, gyroTargetLow);
if (gyroRate >= gmin && gyroRate <= gmax) {