Copter: avoid ascend beyond fence's max alt in circle mode

This commit is contained in:
Shiv Tyagi 2022-06-12 19:42:14 +05:30 committed by Randy Mackay
parent a2172d5b8e
commit 24724ff6bd
1 changed files with 3 additions and 0 deletions

View File

@ -90,6 +90,9 @@ void ModeCircle::run()
// get pilot desired climb rate (or zero if in radio failsafe) // get pilot desired climb rate (or zero if in radio failsafe)
float target_climb_rate = get_pilot_desired_climb_rate(channel_throttle->get_control_in()); float target_climb_rate = get_pilot_desired_climb_rate(channel_throttle->get_control_in());
// get avoidance adjusted climb rate
target_climb_rate = get_avoidance_adjusted_climbrate(target_climb_rate);
// if not armed set throttle to zero and exit immediately // if not armed set throttle to zero and exit immediately
if (is_disarmed_or_landed()) { if (is_disarmed_or_landed()) {
make_safe_ground_handling(); make_safe_ground_handling();