Handle offboard mode with acceleration setpoints

The case when acceleration setpoints were being passed in offboard mode was triggering control_climbrate_mode. This prevented the vehicle from taking off, since it made the vehicle skip the rampup phase of the takeoff
This commit fixes this by handling the case properly
This commit is contained in:
Jaeyoung-Lim 2020-11-27 08:51:48 +01:00 committed by Matthias Grob
parent 3fb8f5df62
commit d2b0f63e1f
1 changed files with 1 additions and 1 deletions

View File

@ -3491,7 +3491,7 @@ Commander::update_control_mode()
!control_mode.flag_control_acceleration_enabled;
control_mode.flag_control_climb_rate_enabled = (!offboard_control_mode.ignore_velocity ||
!offboard_control_mode.ignore_position) && !control_mode.flag_control_acceleration_enabled;
!offboard_control_mode.ignore_position);
control_mode.flag_control_position_enabled = !offboard_control_mode.ignore_position && !_status.in_transition_mode &&
!control_mode.flag_control_acceleration_enabled;