Skip to content
Snippets Groups Projects
Commit ee0aa7b3 authored by Andreas Antener's avatar Andreas Antener Committed by Lorenz Meier
Browse files

recalculate absolute thrust before limiting

parent d9878493
No related branches found
No related tags found
No related merge requests found
......@@ -1573,6 +1573,8 @@ MulticopterPositionControl::task_main()
}
/* limit max thrust */
thrust_abs = thrust_sp.length(); /* recalculate because it might have changed */
if (thrust_abs > thr_max) {
if (thrust_sp(2) < 0.0f) {
if (-thrust_sp(2) > thr_max) {
......
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