Added simple constrain for Alt d term

This commit is contained in:
Jason Short 2012-01-13 08:49:55 -08:00
parent b9419e0123
commit 09c4bbe46e
1 changed files with 1 additions and 1 deletions

View File

@ -190,7 +190,7 @@ get_nav_throttle(int32_t z_error)
rate_d = ((rate_d + climb_rate)>>1) * 1; // replace with gain rate_d = ((rate_d + climb_rate)>>1) * 1; // replace with gain
// slight adjustment to alt hold output // slight adjustment to alt hold output
output -= rate_d; output -= constrain(rate_d, -25, 25);
// light filter of output // light filter of output
output = (old_output * 3 + output) / 4; output = (old_output * 3 + output) / 4;