mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-03 04:03:59 -04:00
Copter: bug fix for alt_hold being passed as int16_t to get_throttle_althold_with_slew
This commit is contained in:
parent
a2216f9d6b
commit
0c520f89d6
@ -1053,7 +1053,7 @@ get_throttle_althold(int32_t target_alt, int16_t min_climb_rate, int16_t max_cli
|
||||
// get_throttle_althold_with_slew - altitude controller with slew to avoid step changes in altitude target
|
||||
// calls normal althold controller which updates accel based throttle controller targets
|
||||
static void
|
||||
get_throttle_althold_with_slew(int16_t target_alt, int16_t min_climb_rate, int16_t max_climb_rate)
|
||||
get_throttle_althold_with_slew(int32_t target_alt, int16_t min_climb_rate, int16_t max_climb_rate)
|
||||
{
|
||||
// limit target altitude change
|
||||
controller_desired_alt += constrain(target_alt-controller_desired_alt, min_climb_rate*0.02, max_climb_rate*0.02);
|
||||
|
Loading…
Reference in New Issue
Block a user