Skip to content
Snippets Groups Projects
Commit 7b13803e authored by Dennis Mannhart's avatar Dennis Mannhart Committed by Lorenz Meier
Browse files

PositionControl: for thrust setpoints only use MPC_MANTHR_MIN for minimum thrust

parent f30bf215
No related branches found
No related tags found
No related merge requests found
......@@ -83,8 +83,8 @@ void PositionControl::generateThrustYawSetpoint(const float &dt)
if (thr_mag > MPC_THR_MAX.get()) {
_thr_sp = _thr_sp.normalized() * MPC_THR_MAX.get();
} else if (thr_mag < MPC_THR_MIN.get() && thr_mag > FLT_EPSILON) {
_thr_sp = _thr_sp.normalized() * MPC_THR_MIN.get();
} else if (thr_mag < MPC_MANTHR_MIN.get() && thr_mag > FLT_EPSILON) {
_thr_sp = _thr_sp.normalized() * MPC_MANTHR_MIN.get();
}
// Just set the set-points equal to the current vehicle state.
......@@ -193,6 +193,7 @@ void PositionControl::_interfaceMapping()
// check failsafe
if (failsafe) {
_skip_controller = true;
// point the thrust upwards
_thr_sp(0) = _thr_sp(1) = 0.0f;
// throttle down such that vehicle goes down with
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment