mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 00:35:34 +03:00
fix comp error
This commit is contained in:
parent
538cebfcb1
commit
2a9d2fe127
1 changed files with 3 additions and 1 deletions
|
@ -118,6 +118,7 @@ static void updateAltitudeThrottleController_MC(timeDelta_t deltaMicros)
|
|||
|
||||
float accel_target_z = navPidApply2(&posControl.pids.vel[Z], posControl.desiredState.vel.z, navGetCurrentActualPositionAndVelocity()->vel.z, US2S(deltaMicros), thrAdjustmentMin, thrAdjustmentMax, 0);
|
||||
|
||||
/*
|
||||
float accel_max_z = 0.0f;
|
||||
|
||||
if (posControl.flags.isAdjustingAltitude) {
|
||||
|
@ -127,7 +128,8 @@ static void updateAltitudeThrottleController_MC(timeDelta_t deltaMicros)
|
|||
}
|
||||
|
||||
// add feed forward component
|
||||
//accel_target_z += constrainf(accel_desired_z, -accel_max_z, accel_max_z);
|
||||
accel_target_z += constrainf(accel_desired_z, -accel_max_z, accel_max_z);
|
||||
*/
|
||||
|
||||
posControl.rcAdjustment[THROTTLE] = accel_target_z;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue