1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-17 21:35:37 +03:00

Change YAW NAV pid scaling and Dterm type

This commit is contained in:
Pawel Spychalski (DzikuVx) 2019-12-26 11:50:07 +01:00
parent 746d7423e8
commit f80e44ac41
2 changed files with 6 additions and 4 deletions

View file

@ -354,6 +354,8 @@ static void updatePositionHeadingController_FW(timeUs_t currentTimeUs, timeDelta
limit = pidProfile()->navFwPosHdgPidsumLimit * 100.0f;
}
const pidControllerFlags_e yawPidFlags = errorIsDecreasing ? PID_SHRINK_INTEGRATOR : 0;
float yawAdjustment = navPidApply2(
&posControl.pids.fw_heading,
0,
@ -361,7 +363,7 @@ static void updatePositionHeadingController_FW(timeUs_t currentTimeUs, timeDelta
US2S(deltaMicros),
-limit,
limit,
pidFlags
yawPidFlags
) / 100.0f;
DEBUG_SET(DEBUG_NAV_YAW, 0, posControl.pids.fw_heading.proportional);