File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/modules/mc_pos_control Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1377,7 +1377,7 @@ MulticopterPositionControl::task_main()
13771377 // into an integral part and into a P part
13781378 thrust_int (2 ) = _takeoff_thrust_sp - _params.vel_p (2 ) * fabsf (_vel (2 ));
13791379 thrust_int (2 ) = -math::constrain (thrust_int (2 ), _params.thr_min , _params.thr_max );
1380- _vel_sp_prev (2 ) = _vel ( 2 ) ;
1380+ _vel_sp_prev (2 ) = -_params. tko_speed ;
13811381 _takeoff_jumped = true ;
13821382 reset_int_z = false ;
13831383 }
@@ -1472,7 +1472,7 @@ MulticopterPositionControl::task_main()
14721472 math::Vector<3 > thrust_sp = vel_err.emult (_params.vel_p ) + _vel_err_d.emult (_params.vel_d ) + thrust_int;
14731473
14741474 if (_pos_sp_triplet.current .type == position_setpoint_s::SETPOINT_TYPE_TAKEOFF
1475- && !_takeoff_jumped) {
1475+ && !_takeoff_jumped && !_control_mode. flag_control_manual_enabled ) {
14761476 // for jumped takeoffs use special thrust setpoint calculated above
14771477 thrust_sp.zero ();
14781478 thrust_sp (2 ) = -_takeoff_thrust_sp;
You can’t perform that action at this time.
0 commit comments