mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 17:31:35 +08:00
TECS: Fix bug (underspeed-condition did not have any effect on throttle)
This commit is contained in:
@@ -299,7 +299,7 @@ void TECS::_update_throttle(float throttle_cruise, const math::Matrix<3,3> &rotM
|
|||||||
// Calculate throttle demand
|
// Calculate throttle demand
|
||||||
// If underspeed condition is set, then demand full throttle
|
// If underspeed condition is set, then demand full throttle
|
||||||
if (_underspeed) {
|
if (_underspeed) {
|
||||||
_throttle_dem_unc = 1.0f;
|
_throttle_dem = 1.0f;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Calculate gain scaler from specific energy error to throttle
|
// Calculate gain scaler from specific energy error to throttle
|
||||||
@@ -363,10 +363,10 @@ void TECS::_update_throttle(float throttle_cruise, const math::Matrix<3,3> &rotM
|
|||||||
} else {
|
} else {
|
||||||
_throttle_dem = ff_throttle;
|
_throttle_dem = ff_throttle;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Constrain throttle demand
|
// Constrain throttle demand
|
||||||
_throttle_dem = constrain(_throttle_dem, _THRminf, _THRmaxf);
|
_throttle_dem = constrain(_throttle_dem, _THRminf, _THRmaxf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TECS::_detect_bad_descent(void)
|
void TECS::_detect_bad_descent(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user