diff --git a/src/modules/mc_pos_control/mc_pos_control_main.cpp b/src/modules/mc_pos_control/mc_pos_control_main.cpp index db5505ba43..09dabe01ea 100644 --- a/src/modules/mc_pos_control/mc_pos_control_main.cpp +++ b/src/modules/mc_pos_control/mc_pos_control_main.cpp @@ -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