mc pos control:

do not run takeoff code when disarmed
This commit is contained in:
Roman 2016-02-10 15:40:18 +01:00 committed by Lorenz Meier
parent ff43c1ab6a
commit 38ecec86f7
1 changed files with 3 additions and 2 deletions

View File

@ -1365,9 +1365,10 @@ MulticopterPositionControl::task_main()
_vel_sp(2) = _params.land_speed;
}
/* velocity handling during takeoff */
/* special thrust setpoint generation for takeoff from ground */
if (!_control_mode.flag_control_manual_enabled && _pos_sp_triplet.current.valid
&& _pos_sp_triplet.current.type == position_setpoint_s::SETPOINT_TYPE_TAKEOFF) {
&& _pos_sp_triplet.current.type == position_setpoint_s::SETPOINT_TYPE_TAKEOFF
&& _control_mode.flag_armed) {
// check if we are not already in air.
// if yes then we don't need a jumped takeoff anymore