mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Merge pull request #7884 from etracer65/gps_rescue_throttle_pid_fix
Fix GPS Rescue throttle PID calculation
This commit is contained in:
commit
fa3fd566e4
1 changed files with 1 additions and 1 deletions
|
@ -299,7 +299,7 @@ static void rescueAttainPosition()
|
|||
|
||||
previousAltitudeError = altitudeError;
|
||||
|
||||
const int16_t altitudeAdjustment = (gpsRescueConfig()->throttleP * altitudeError + (gpsRescueConfig()->throttleI * altitudeIntegral) / 10 * + gpsRescueConfig()->throttleD * altitudeDerivative) / ct / 20;
|
||||
const int16_t altitudeAdjustment = (gpsRescueConfig()->throttleP * altitudeError + (gpsRescueConfig()->throttleI * altitudeIntegral) / 10 + gpsRescueConfig()->throttleD * altitudeDerivative) / ct / 20;
|
||||
const int16_t hoverAdjustment = (hoverThrottle - 1000) / ct;
|
||||
|
||||
rescueThrottle = constrain(1000 + altitudeAdjustment + hoverAdjustment, gpsRescueConfig()->throttleMin, gpsRescueConfig()->throttleMax);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue