mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-07 04:01:36 +08:00
recalculate absolute thrust before limiting
This commit is contained in:
committed by
Lorenz Meier
parent
d9878493bd
commit
ee0aa7b37d
@@ -1573,6 +1573,8 @@ MulticopterPositionControl::task_main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* limit max thrust */
|
/* limit max thrust */
|
||||||
|
thrust_abs = thrust_sp.length(); /* recalculate because it might have changed */
|
||||||
|
|
||||||
if (thrust_abs > thr_max) {
|
if (thrust_abs > thr_max) {
|
||||||
if (thrust_sp(2) < 0.0f) {
|
if (thrust_sp(2) < 0.0f) {
|
||||||
if (-thrust_sp(2) > thr_max) {
|
if (-thrust_sp(2) > thr_max) {
|
||||||
|
|||||||
Reference in New Issue
Block a user