1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

throttle does not accelerate downwards but upwards - switched sign

This commit is contained in:
Corvus Corax 2013-12-08 10:44:17 +01:00
parent 981fc4321d
commit 90f689cfa1

View File

@ -171,7 +171,7 @@ static void altitudeHoldTask(void)
}
// acceleration control loop
float throttle = startThrottle + pid_apply_setpoint(&accelpid, 1.0f, rotatedAccelDesired, accelStateDown, 1000 / DESIRED_UPDATE_RATE_MS);
float throttle = startThrottle - pid_apply_setpoint(&accelpid, 1.0f, rotatedAccelDesired, accelStateDown, 1000 / DESIRED_UPDATE_RATE_MS);
if (throttle >= 1.0f) {
throttle = 1.0f;